wordless/wl_nlp/wl_pos_tagging.py
Function wl_pos_tag
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def wl_pos_tag(main, inputs, lang, pos_tagger = 'default', tagset = 'default', force = False):
Avoid deeply nested control flow statements. Open
Open
for doc in nlp.pipe(docs):
for token in doc:
texts_tagged.append(token.text)
if tagset in ['default', 'raw']:
Avoid deeply nested control flow statements. Open
Open
for doc in nlp.pipe(lines):
for token in doc:
texts_tagged.append(token.text)
if tagset in ['default', 'raw']:
Avoid deeply nested control flow statements. Open
Open
for sentence in doc.sentences:
for token in sentence.words:
texts_tagged.append(token.text)
if tagset in ['default', 'raw']:
Avoid deeply nested control flow statements. Open
Open
for tokens in wl_nlp_utils.split_token_list(main, texts, pos_tagger):
# The Japanese model do not have a tagger component and Japanese POS tags are taken directly from SudachiPy
# See: https://github.com/explosion/spaCy/discussions/9983#discussioncomment-1910117
if lang == 'jpn':
docs.append(''.join(tokens))
Avoid deeply nested control flow statements. Open
Open
for sentence in doc.sentences:
for token in sentence.words:
texts_tagged.append(token.text)
if tagset in ['default', 'raw']:
Function wl_pos_tag_universal
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def wl_pos_tag_universal(main, inputs, lang, pos_tagger = 'default', tagged = False):