blob: 582108aef0cb2f06747a0b250f016fbf3203b154 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
|