Ejemplo n.º 1
0
from XML_parser.XMLparser import parse
from TFIDF_indexer.TFIDFindexer import index
from TFIDF_searcher.TFIDFsearcher import searchArticles, searchTopWords
import time

starttime = time.time()
parsedCorpus = parse(0)
print

indexes = index(parsedCorpus)
TFIDFindex = indexes[0]
ARTICLEindex = indexes[1]
print

articles = searchArticles(TFIDFindex, ARTICLEindex)
print

searchTopWords(TFIDFindex, ARTICLEindex, articles,20)
print


print "Total time elapsed: %s seconds" % round((time.time() - starttime), 3)
Ejemplo n.º 2
0
from XML_parser.XMLparser import parse
from TFIDF_indexer.TFIDFindexer import index
from TFIDF_searcher.TFIDFsearcher import search
import time

starttime = time.time()
parse(0)
print 
index(0)
print
search(0)
print
print "Total time elapsed: %s seconds" % round((time.time() - starttime), 3)