01 noiembrie 2013
28 octombrie 2013
IR: simulare term-document incidence matrix, inverted index
Enunt:
(a). Write a program to create the term-document incidence matrix for a document collection. The output of this part will be binary term x document matrix file with headings associated with rows (index terms) and columns (DocIDs).
(b). Program to generate the inverted index(consisting of a dictionary and postings) for the input documents collection. There are four main steps to create inverted index:
1) Collect the documents to be indexed.
2) Tokenize the text, turning each document into a list of tokens.
3) Do linguistic preprocessing, tokens normalization and stemming.
4) Create an inverted index, consisting of a dictionary and postings.
You need not perform normalization and stemming in step 3. But you should remove stop words from the tokens list. The dictionary and postings will be the final output that can be in any mode (such as binary file, text file, screen display and so on).
Rezolvari:
* java
* php
(a). Write a program to create the term-document incidence matrix for a document collection. The output of this part will be binary term x document matrix file with headings associated with rows (index terms) and columns (DocIDs).
(b). Program to generate the inverted index(consisting of a dictionary and postings) for the input documents collection. There are four main steps to create inverted index:
1) Collect the documents to be indexed.
2) Tokenize the text, turning each document into a list of tokens.
3) Do linguistic preprocessing, tokens normalization and stemming.
4) Create an inverted index, consisting of a dictionary and postings.
You need not perform normalization and stemming in step 3. But you should remove stop words from the tokens list. The dictionary and postings will be the final output that can be in any mode (such as binary file, text file, screen display and so on).
Rezolvari:
* java
* php
19 octombrie 2013
Exemple Otter: truth tellers, liars & normal people
O serie de probleme rezolvate în Otter. Primele 7 implică o lume locuită doar de truth tellers și mincinoși, pe când în ultimele 3 sunt introduși și oamenii „normali” (care spun adevărul sau mint, la întâmplare). Enunț - să se afle A, B (și C) dacă:
1) A says: at least one of us (A. B) is a liar
2) A says: either I am a liar or B is a truth teller.
3) A says: all of us are liars (A, B, C)
B says: exactly one of us (from A, B, C) is a truth teller
4) A says: all of us are liars (A, B, C)
B says: exactly one of us is a liar
5) A says: B is a liar
B says: A, C are of the same type (both liars or both truth tellers)
6) A says: if I am a truth teller, then so is B
7) A says: if B is a truth teller, then I am a liar
8) A, B, C each of the following: liar, truth teller, normal
A: I am normal
B: that is true
C: I am not normal
9) A truth teller can marry a liar and vice versa. Normal person can marry only normal person. A couple says:
Mr. A: My wife is not normal
Mrs A: My husband is not normal
10) The same couple. They say:
Mr A: My wife is normal
Mrs A: My husband is normal
Soluțiile aici.
1) A says: at least one of us (A. B) is a liar
2) A says: either I am a liar or B is a truth teller.
3) A says: all of us are liars (A, B, C)
B says: exactly one of us (from A, B, C) is a truth teller
4) A says: all of us are liars (A, B, C)
B says: exactly one of us is a liar
5) A says: B is a liar
B says: A, C are of the same type (both liars or both truth tellers)
6) A says: if I am a truth teller, then so is B
7) A says: if B is a truth teller, then I am a liar
8) A, B, C each of the following: liar, truth teller, normal
A: I am normal
B: that is true
C: I am not normal
9) A truth teller can marry a liar and vice versa. Normal person can marry only normal person. A couple says:
Mr. A: My wife is not normal
Mrs A: My husband is not normal
10) The same couple. They say:
Mr A: My wife is normal
Mrs A: My husband is normal
Soluțiile aici.
15 octombrie 2013
Resurse pentru GRE, Toefl și pregătirea aplicației pentru SUA
GRE:
Barron's GRE - full preparation book (explicații & teste)
Princeton's GRE - full prep book (explicații & teste)
Mondays with Jen - tutoriale video pentru toate tipurile de exerciții la GRE
http://www.majortests.com/gre/ - liste de cuvinte, exerciții pentru verbal & quant
TOEFL:
Kaplan's Toefl ibt - tips pentru reading, writing & speaking
Youtube Toefl listening - cu răspunsuri
Cea mai bună resursă online cu întrebări și răspunsuri:
Barron's GRE - full preparation book (explicații & teste)
Princeton's GRE - full prep book (explicații & teste)
- must work, cel puțin una din cărți (mai sunt și altele, de exemplu Kaplan GRE) . Dacă stați în București, cel mai convenabil mi se pare studiul la sediul Fulbright, e liniște, atmosferă ideală pentru studiu și aveți acces la o pleiadă de cărți pe care le puteți consulta gratuit
Mondays with Jen - tutoriale video pentru toate tipurile de exerciții la GRE
- fff bun, ai impresia că iei meditații. Există episoade speciale care tratează doar exercițiile mai tricky de la GRE, dar și o colecție destul de bună de exerciții de vocabular, cum să abordezi textele pentru citit, etc
http://www.majortests.com/gre/ - liste de cuvinte, exerciții pentru verbal & quant
TOEFL:
Kaplan's Toefl ibt - tips pentru reading, writing & speaking
Youtube Toefl listening - cu răspunsuri
- din nou, pentru mai multe materiale mergeți la Fulbright
Cea mai bună resursă online cu întrebări și răspunsuri:
- Happy Schools Blog --- un blog despre orice aspect legat de aplicație și SUA, aproape exhaustiv. Perspectiva este indiană în principal, dar merge.
23 iulie 2013
Udacity HTML5 course (1)
* creating a XMLHttpRequest object
var request = new XMLHttpRequest();
request.open ('GET', myUrl, true); // true = async
request.onload = function () {
// define your function
}
request.send();
* classes which extend other classes
Weapon = Class.extend({
init: function() { this._super(); }
});
MachineGun = Weapon.extend({
init: function() { this._super(); }
});
* append a new image to a canvas
var img = new Image();
img.src = 'mySrc';
img.onload = function () {
var canvas = document.createElement("canvas");
var ctx = canvas.getContext('2d');
var obj = ctx.drawImage(img, 192,192);
// the origin of the canvas xOy system is on the top left corner
}
* Jpeg - good size/compression; bad Alpha
Png - bad size/compression; good Alpha
Webp - good; good
* create an animated canvas
// assets = array of paths to images; frames = new array of images
for (var i=0; i<assets.length; i++) {
var img = new Image();
img.src = assets[i];
img.onload = onImageLoad;
frames.push(img);
}
var frameRate = 1000/30; // 30 fps
setInterval(animate, frameRate);
var animate = function() {
// ctx = canvas.getContext('2d');
ctx.clearRect(0,0,canvas.width, canvas.height);
ctx.drawImage(frames[frame], 0, 0); // changes the current image to the next one
frame++;
if (frame == frames.length) {
frame = 0;
}
};
var request = new XMLHttpRequest();
request.open ('GET', myUrl, true); // true = async
request.onload = function () {
// define your function
}
request.send();
* classes which extend other classes
Weapon = Class.extend({
init: function() { this._super(); }
});
MachineGun = Weapon.extend({
init: function() { this._super(); }
});
* append a new image to a canvas
var img = new Image();
img.src = 'mySrc';
img.onload = function () {
var canvas = document.createElement("canvas");
var ctx = canvas.getContext('2d');
var obj = ctx.drawImage(img, 192,192);
// the origin of the canvas xOy system is on the top left corner
}
* Jpeg - good size/compression; bad Alpha
Png - bad size/compression; good Alpha
Webp - good; good
* create an animated canvas
// assets = array of paths to images; frames = new array of images
for (var i=0; i<assets.length; i++) {
var img = new Image();
img.src = assets[i];
img.onload = onImageLoad;
frames.push(img);
}
var frameRate = 1000/30; // 30 fps
setInterval(animate, frameRate);
var animate = function() {
// ctx = canvas.getContext('2d');
ctx.clearRect(0,0,canvas.width, canvas.height);
ctx.drawImage(frames[frame], 0, 0); // changes the current image to the next one
frame++;
if (frame == frames.length) {
frame = 0;
}
};
Abonați-vă la:
Postări (Atom)