Esempio n. 1
0
def CLIHandler():
    reuters = ReutersData(os.path.join("Samples", "Reuters"))
    reuters.constructIndexReader()

    while True:
        queryString = input("Wildcard Query String: ")
        for docId, score in reuters.ScoredQuery(queryString, -1):
            print(score, reuters.documentMap[docId][0])
            print(reuters.documentMap[docId][2])
Esempio n. 2
0
def CGIHandler():
    reuters = ReutersData(os.path.join("Samples", "Reuters"))
    reuters.constructIndexReader()
    FlaskServer.run(reuters)