Refactor by adding context
Signed-off-by: András Schmelczer <andras@schmelczer.dev>
This commit is contained in:
parent
83e1a673cf
commit
a03e78bb73
21 changed files with 134 additions and 100 deletions
|
|
@ -15,6 +15,7 @@ def predict_domain(
|
|||
text: str, model: Pipeline, cut_off_probability: float = 0.2
|
||||
) -> List[DomainPrediction]:
|
||||
assert 0 <= cut_off_probability <= 1
|
||||
|
||||
cleaned = clean(text, convert_to_ascii=True)
|
||||
text = re.sub(r"[^a-zA-Z0-9]", " ", cleaned)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue