MCPcopy Create free account
hub / github.com/PaddlePaddle/Research / ner

Function ner

NLP/Text2SQL-BASELINE/text2sql/utils/text_utils.py:62–78  ·  view source on GitHub ↗

wordseg and ner Args: sentence (TYPE): NULL Returns: TODO Raises: NULL

(sentence)

Source from the content-addressed store, hash-verified

60EMPTY_TAG = 'o'
61
62def ner(sentence):
63 """wordseg and ner
64
65 Args:
66 sentence (TYPE): NULL
67
68 Returns: TODO
69
70 Raises: NULL
71 """
72 results = lac(sentence)
73 words = results[0]
74 tags_tmp = results[1]
75 tags = []
76 for tag in tags_tmp:
77 tags.append(g_ner_tag_mapping.get(tag, EMPTY_TAG))
78 return (words, tags)
79
80
81def ngrams(tok_list, n):

Callers

nothing calls this directly

Calls 2

appendMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected