wordless/wl_nlp/wl_nlp_utils.py
Avoid deeply nested control flow statements. Open
Open
if prefer_raw:
# Always use original tokens
results_modified.extend(tokens_raw_temp)
# eg. POS tagging
else:
Avoid deeply nested control flow statements. Open
Open
if len_raw_temp_tokens == len_processed_temp_tokens:
results_modified.extend(results_temp)
elif len_raw_temp_tokens < len_processed_temp_tokens:
results_modified.extend(results_temp[:len_raw_temp_tokens])
elif len_raw_temp_tokens > len_processed_temp_tokens: