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

added lemmas to tsv even without verbose output format option #1485

Closed
wants to merge 1 commit into from

Conversation

churow
Copy link

@churow churow commented Mar 17, 2025

No description provided.

sb.append(word);
sb.append('\t');
if (outputLemmas) {
String lemma = ((HasLemma) hw).lemma();
Copy link
Contributor

Choose a reason for hiding this comment

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

would you check that it is a HasLemma here first?

Copy link
Author

Choose a reason for hiding this comment

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

I just followed original use of HasTag without check pattern.
HasWord, HasTag & HasLemma are implemented through src/edu/stanford/nlp/ling/AbstractToken.java

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that makes sense. However, the assumption is that every class that comes through the tagger will be both HasWord and HasTag, whereas if the tagger is using the WordTag class, there may not be a Lemma.

@AngledLuffa
Copy link
Contributor

I am drafting a new release this weekend, and aside from the change I requested I also need it merged to dev and not main, so I recreated the change and left you as the author:

#1487

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