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

Templatize comparative adjectives with respect to sort order. #38

Open
jaidevd opened this issue Feb 10, 2020 · 1 comment
Open

Templatize comparative adjectives with respect to sort order. #38

jaidevd opened this issue Feb 10, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request nlp Issues related to NLP and smartness.

Comments

@jaidevd
Copy link
Member

jaidevd commented Feb 10, 2020

In context of the actors dataset,

doc = nlp('James Stewart has the highest rating.')
fh_args = {'_sort': ['-rating']}
nugget = templatize(doc, fh_args, df)
print(nugget)
{% set fh_args = {"_sort": ["-rating"]}  %}
{% set df = U.gfilter(orgdf, fh_args.copy()) %}
{% set fh_args = U.sanitize_fh_args(fh_args, orgdf) %}
{# Do not edit above this line. #}
{{ df["name"].iloc[0] }} is the {{ G.singular(df["category"].iloc[-2]).lower() }} with the highest rating.

The adjective highest should be templatized in the following manner:

  1. Find its lemma and inflected form and put them in a variable.
  2. Tie the lemma to the sort order.
  3. Automatically insert the antonym of the lemma if the sort order changes.
@jaidevd jaidevd added the enhancement New feature or request label Feb 10, 2020
@jaidevd jaidevd self-assigned this Feb 10, 2020
@jaidevd jaidevd added the nlp Issues related to NLP and smartness. label Feb 10, 2020
@jaidevd
Copy link
Member Author

jaidevd commented Feb 10, 2020

See this gist for some initial examples of getting antonyms with wordnet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request nlp Issues related to NLP and smartness.
Projects
None yet
Development

No branches or pull requests

1 participant