gramener / gramex-nlg

Natural Language Generation for Gramex applications.
Other
24 stars 24 forks source link

Not Working #53

Open pratyakashnewfangled opened 4 years ago

pratyakashnewfangled commented 4 years ago

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 commented 4 years ago

Can you please share your code?

pratyakashnewfangled commented 4 years ago

`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 commented 4 years ago

And what is the output you are getting?

pratyakashnewfangled commented 4 years ago

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

jaidevd commented 4 years ago

Got it. Could you share doc2.csv also?

pratyakashnewfangled commented 4 years ago

Sheet Link:- https://docs.google.com/spreadsheets/d/1H1BZeYohtBhev9n7ggCRWTCBjtycUq8dZRuVTgZT7a8/edit?usp=sharing

jaidevd commented 4 years ago

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

pratyakashnewfangled commented 4 years ago

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

kunalshriwas commented 2 years ago

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