Instantly share code, notes, and snippets.

Embed
What would you like to do?
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