NPExtractor

class lexnlp.extract.en.utils.NPExtractor(grammar=None)

Bases: object

Attributes Summary

exception_pos
exception_sym
sym_with_space
sym_without_space

Methods Summary

cleanup_leaves(leaves)
get_np(text)
get_tokenizer()
join(np_items)
sep(n, current_pos, last_pos)
strip_np(np)

Attributes Documentation

exception_pos = ['IN', 'CC']
exception_sym = ['&', 'and', 'of']
sym_with_space = ['(', '&']
sym_without_space = '!"#$%\')*+,-./:;<=>?@[\\]^_`{|}~'

Methods Documentation

cleanup_leaves(leaves)
get_np(text)
get_tokenizer()
join(np_items)
sep(n, current_pos, last_pos)
static strip_np(np)