pyrediseA simple and fast search engine | |
Download |
pyredise Ranking & Summary
Advertisement
- License:
- The Apache License 2.0
- Price:
- FREE
- Publisher Name:
- Christos Spiliopoulos
- Publisher web site:
- http://github.com/hymloth/
pyredise Tags
pyredise Description
pyredise is a simple and fast search engine based on Python and Redis.Installation git clone git@github.com:hymloth/pyredise.git cd pyredise sudo python setup.py installInstructions:- You must have redis installed and configured properly- As a starting point, take a look at corpus_handler.py- Initialize it with a python-redis instance:import redisimport corpus_handlerdb = = redis.Redis(host='localhost', port=6379, db=0) cp = corpus_handler.CorpusHandler(db=db)- Somehow, you must have some documents to index. Then, you only need a document's id (doc_id), its title and its content.#So you must provide a dictionary with the following format:doc = {"id":doc_id, "title":doc_title, "content":doc_content}cp.index( doc )Filters:- /pure_tfidf : ranking based only on tf-idf scheme- /title_only : title matching- /complete : ranking based on tf-idf scheme, proximity and titleimport query_handlerimport redisdb = = redis.Redis(host='localhost', port=6379, db=0)QH = query_handler.QueryHandler(db=db)# issue some queries, returning a list of tuples such as print QH.process_query("google security data /pure_tfidf") # ranking only according to tf-idfprint QH.process_query("google security data /complete") # completeprint QH.process_query("google security data /title_only") # search in titlesFor those who haven't noticed, pyredise is named in honor of PY(thon)REDI(s)S(earch)E(ngine)Product's homepage
pyredise Related Software