Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_only_wti(doc,includew=None):
- words = set()
- wordstoret=set()
- for word in re.split('\\W+', doc):
- if 2 < len(word) < 20:
- words.add(word.lower())
- for word in words:
- if word in includew:
- wordstoret.add(word.lower())
- return wordstoret
- def helper_fun(doc):
- return get_only_wti(doc,words_to_include)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement