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

Not Working #53

Open
pratyakashnewfangled opened this issue Jun 22, 2020 · 9 comments
Open

Not Working #53

pratyakashnewfangled opened this issue Jun 22, 2020 · 9 comments

Comments

@pratyakashnewfangled
Copy link

pratyakashnewfangled commented Jun 22, 2020

NLG is not working. I am not getting the expected result even I replicate the same example I am getting James in result when I changed sort by rating for desc it is giving me the same result.
[Python Script]

@jaidevd
Copy link
Member

jaidevd commented Jun 22, 2020

Can you please share your code?

@pratyakashnewfangled
Copy link
Author

pratyakashnewfangled commented Jun 22, 2020

`from nlg.search import templatize, render
from gramex.data import filter as gfilter
import pandas as pd
from nlg.utils import load_spacy_model
nlp = load_spacy_model()

df = pd.read_csv('doc2.csv')
fh_args = {
'_sort': ['Rating']
}

xdf = gfilter(df, fh_args.copy())

text = nlp('roshan is best doctor')

nugget = templatize(text, fh_args, xdf)

print(nugget.render(df))`

I tried df and xdf both in render

@jaidevd
Copy link
Member

jaidevd commented Jun 22, 2020

And what is the output you are getting?

@pratyakashnewfangled
Copy link
Author

Name | Rating Vishal | 1 Vikas | 2 Roshan | 3 Praveen | 4 Saroj | 5
I am getting roshan everytime even I changed sort by '-Rating'

@jaidevd
Copy link
Member

jaidevd commented Jun 22, 2020

Got it. Could you share doc2.csv also?

@jaidevd
Copy link
Member

jaidevd commented Jun 22, 2020

I'm able to reproduce this. There is a problem with the inflection detection. Will post a fix soon.

@pratyakashnewfangled
Copy link
Author

Hi, When user will going to get new release with fix ?

@kunalshriwas
Copy link

kunalshriwas commented Jul 26, 2022

@jaidevd even i am getting same issue , even i am providing "-votes", i am getting rating in output rendered text

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

3 participants