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

Numerizer added #56

Open
wants to merge 972 commits into
base: dev
Choose a base branch
from

Conversation

venkatakrishnareddymallu

This will format the numbers in English language to numbers for a give text template.

Example: "John, Bob are the top two candidates in the list" -->"John, Bob are the top 2 candidates in the list"

@@ -565,6 +568,7 @@ def templatize(text, args, df):
The iris dataset has 3 {{ df.columns[0] }} - {{ df["species"].iloc[0] }}, \
{{ df["species"].iloc[1] }} and {{ df["species"].iloc[-1] }}.
"""
text = nlp(numerize(str(text)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accept two kinds of input: a spacy Doc or a Python string. If the input is a spacy doc:

  1. numerize it as numerize(text.text) and remap it back.
  2. If it's text, convert to a spacy doc first.

@jaidevd
Copy link
Member

jaidevd commented Nov 26, 2020

@venkatakrishnareddymallu Can you please take a look at the failing tests and try to fix them?

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

Successfully merging this pull request may close these issues.

2 participants