emorynlp / nlp4j-old

NLP tools developed by Emory University.
Other
60 stars 19 forks source link

Get fields from FeatureTemplate #3

Closed reckart closed 8 years ago

reckart commented 8 years ago

It would be nice if there was a getter for the fields (/features) used in a feature template. The information can be crudely extracted from the toString() method (or using reflection), but a proper getter would be nicer.

jdchoi77 commented 8 years ago

Could you give me an example of the aspect you're describing? Thanks.

reckart commented 8 years ago

I am building UIMA wrappers for NLP4J in DKPro Core. Here it is useful to check if

See for example:

jdchoi77 commented 8 years ago

Got it; I'll work on this for the next version as well.

reckart commented 8 years ago

Is this implemented in 1.1.0? It seems there is still no accessor method.

jdchoi77 commented 8 years ago

Not yet, 1.1.0 release was not planned but I found a way of reducing the models, which was asked by so many people, so decided to make an early release. I'll make a minor release (possibly, 1.1.1) for this change. Thanks for reminder.

best,

Jinho

jdchoi77 commented 8 years ago

Would something like this work for you?

https://github.com/emorynlp/nlp4j-core/blob/master/src/main/java/edu/emory/mathcs/nlp/component/template/feature/FeatureTemplate.java#L80 https://github.com/emorynlp/nlp4j-core/blob/master/src/main/java/edu/emory/mathcs/nlp/component/template/feature/FeatureTemplate.java#L85 https://github.com/emorynlp/nlp4j-core/blob/master/src/main/java/edu/emory/mathcs/nlp/component/template/feature/FeatureTemplate.java#L90

Please let me know if you need more methods. I'm going to make the 1.1.1 release with this change once this gets resolved. Thanks!

best,

Jinho

reckart commented 8 years ago

That should be working just nicely. Do you have a Maven repo with SNAPSHOT builds somewhere?

jdchoi77 commented 8 years ago

I'm pushing a new release with this change now; will make the release note in few minutes.

jdchoi77 commented 8 years ago

I'm closing this issue; please let me know if more things come up. Thanks.