Information retrieval system.
- Work on a local document corpus.
- Parse and index documents using inverted file format
- Make use of stemming and stop lists.
- Implement matching based on tf-idf algorithm.
- Results are displayed based on relevance ranking.
- src/Source.cpp Program source codes
- src/IndexCreator.ext Compiled, exectuable codes. Generate from source.cpp
- data/stop.txt Stop words get from internet.
- data/TD_IDF_INDEX.txt Web stite conetent get from Steves Institue site by web scrawler.
- data/test/... Different training results based on size.
存数据 已知 term, doc, tf, idf 建一个hash mytable( key=term value=doc) For 循环读取每行信息 If (tf!=0) Mytable[key]=vector.push(doc) End for 返回mytable
查询 term 返回 mytable[term];
查询 term and term1 或者 term term1 返回 mytable[term] && mytable[term1]
查询 term or term1 返回 mytable[term] || mytable[term1]
查询 not term 返回 whole doc list - mytable[term]
用栈处理查询语句优先级 将处理后的查询语句循环查询