betoesquivel icon

Python Example: How to create a text index

betoesquivel | PRO | 09/07/13 07:42:37 AM UTC | 0 ⭐ | 280 👁️ | Never ⏰ | []
Python |

280 B

|

None

|

0 👍

/

0 👎

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);

Comments