Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class index:
- def create(D) :
- for d in D:
- for w in d:
- i = index.lookup(w) //regresa -1 si no lo encontró
- if i<0:
- j = index.add(w)
- index.append(j,d.id);//.id hace referencia solamente a la url del documento
- else:
- index.append(i,d.id);
Advertisement
Add Comment
Please, Sign In to add comment