-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StringForwardIndexBuilder #12
Labels
Milestone
Comments
Once the above is finished (or during), here's some ideas for term processing. We need two kinds of objects:
class EnglishStemmer:
def __init__(self):
self.stemmer = SnowballStemmer("english")
def process(self, term):
return self.stemmer.stem(term)
class EnglishStopWordsPruner:
def __init__(self):
self.stopwords = set(stopwords.words('english'))
def test(self, term):
return term not in self.stopwords A list of term processors/pruners should be configured, possibly in JSON parameters. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation
A simple forward index builder to use in unit/integration testing.
Description
Write
StringForwardIndexBuilder
(within moduleReSearch/research/index/forward.py
), a class with the following interface:where
properties
is a JSON object with index properties (seeReSearch/test/index/test_forward_index.py
for an example), andinput
is a TextIOBase object, like those created by the following statements:Use the NLTK tokenizer:
No need for stemming or removing punctuation at this point. This one should be used for testing and debugging. At a later point, it should use unified interface with other builders but it is not a concern now.
The text was updated successfully, but these errors were encountered: