diff options
Diffstat (limited to 'source/search.py')
-rw-r--r-- | source/search.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/search.py b/source/search.py new file mode 100644 index 00000000..582108ae --- /dev/null +++ b/source/search.py @@ -0,0 +1,20 @@ +#! /usr/bin/env/python +# -*- coding: utf-8 -*- + +import utils + +class Search(object): + """ + """ + def __init__(self): + self.terms = {} + + def index(self): + pass + + def search(self, word): + result = [] + for term, texts in self.terms.items(): + if word in term: + result.extend(text) + return result
\ No newline at end of file |