-
-
Save funktor/15ef0424569e24edeed208596a87910b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def predict_age_range(sentence, tagger): | |
tokens = get_tokens(sentence) | |
return extract_phrase(tokens, tagger) | |
tagger = pycrfsuite.Tagger() | |
tagger.open('age_range.crfsuite') | |
sent = 'Melissa & Doug Deluxe Picnic Basket Fill and Spill Soft Baby Toy - Weight - 7 oz. Assembly required - no assembly required. Dimensions - 6.7" l x 11" w x 11.5" h. Age recommendation - 6 months to 5 years.' | |
predict_age_range(sent, tagger) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment