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

Bring word gender as a separate key #1

Closed
ytrofimov opened this issue Dec 27, 2016 · 2 comments
Closed

Bring word gender as a separate key #1

ytrofimov opened this issue Dec 27, 2016 · 2 comments

Comments

@ytrofimov
Copy link

Hi Roman, thanks a lot for the API!
Feature request that would make this API much better than google translate API for learning new words: could you bring out the gender of the word as a separate key?
i.e. https://linguee-api.herokuapp.com/api?q=sonne&src=de&dst=en
format this

"text": "Sonne",
"word_type": "noun, feminine",

into this

"text": "Sonne",
"word_type": "noun",
"gender": "feminine"

as a bonus if you could add actual article (feminine = die, masculine = der, neuter = das), that would be total ace!

"article": "die"

@imankulov
Copy link
Owner

Hi! Thanks for the feedback. Now the parser returns a structured information about the part of speech, gender (whenever if makes sense) and a plural form flag (if it's true).

as a bonus if you could add actual article (feminine = die, masculine = der, neuter = das), that would be total ace!

With that information it shouldn't be a problem for your case, yet obviously it's quite non-trivial to generalize. For example, English articles don't depend on gender, but change "a" to "an" or alternatively you can use "the". Also, in some cases you shouldn't use any articles at all. Different languages have different grammar rules and it goes way out of the scope of a simple parser.

@ytrofimov
Copy link
Author

@imankulov wow, didn't expect such fast response, thanks a lot!

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