NPExtractor

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

Bases: object

Attributes Summary

Methods Summary

Attributes Documentation

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

Methods Documentation

cleanup_leaves(leaves)
get_np(text: str) → Generator[[str, None], None]
get_tokenizer()
join(np_items)
sep(n, current_pos, last_pos)
static strip_np(np)