Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalization of user-provided spans #86

Open
Tomarchelone opened this issue Sep 7, 2020 · 1 comment
Open

Normalization of user-provided spans #86

Tomarchelone opened this issue Sep 7, 2020 · 1 comment

Comments

@Tomarchelone
Copy link

As I understand from the docs, the normalize() method can be called on text spans, that were built by tag_ner() method.

Is there a way to normalize a span of text, that does not appear in doc.spans? Can it be provided by the user?

@kuk
Copy link
Member

kuk commented Sep 7, 2020

There is no public API for that. One may use internal normalize https://github.com/natasha/natasha/blob/master/natasha/norm.py#L126 and syntax_normalize https://github.com/natasha/natasha/blob/master/natasha/norm.py#L119. Please read the code to learn how to prepare vocab and tokens arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants