Exemplo 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])
Exemplo n.º 2
0
def CGIHandler():
    reuters = ReutersData(os.path.join("Samples", "Reuters"))
    reuters.constructIndexReader()
    FlaskServer.run(reuters)