From: Nancy I. <id...@cs...> - 2012-06-01 16:48:30
|
On Jun 1, 2012, at 12:12 PM, Ian Roberts wrote: > On 01/06/2012 16:34, Nancy Ide wrote: >> Thanks Ian! >> >> I'm using GATE 7.0. How do I put the MatchesAnnots feature on my >> documents--or rather, what is the value of that feature? I can use JAPE >> to do something like >> >> doc.getFeatures().put("MatchesAnnots", "???"); << but what goes in the value field? > > This feature is a complicated beast, its value is not a String but a > complex Java object. It is a Map<String, List<ArrayList<Integer>>>, > where the keys in the map are annotation set names (null for the default > set) and the corresponding value is a list of coreference chains within > that annotation set, where each chain is represented as an ArrayList of > Integer annotation IDs. > >> As for problems saving, I am using our own plugins to read in and >> generate GrAF, where the "matches" annotations are preserved. > > If you have the proper matches annotation features, and assuming that > the original annotation IDs are preserved when saving/loading GrAF, then > you may be able to re-create the document-level matches map from those, > but I'm not 100% certain that all the necessary information makes it > into the per-annotation matches features in the first place. You'll > have to try it and see how it looks. I think that it may be more trouble than it is worth, although being able to use the coreference editor would be very helpful. Just out of curiosity, how does this document level feature get added automatically (when using the pronominal and nominal annotators?)--or doesn't it? > > Note that the annotation-level "matches" feature is also a non-String > value, it's a List<Integer> containing the IDs of the other annotations > with which it corefers. If it has been toString()ed when the document > was saved to GrAF then you'll have to parse the IDs back out of the > string yourself with something like > > List<Integer> ids = new ArrayList<Integer>(); > Matcher m = Pattern.compile("\\d+").matcher(matchesFeatureValue); > while(m.find()) { > ids.add(Integer.valueOf(m.group())); > } Thanks! Nancy > > Ian > > -- > Ian Roberts | Department of Computer Science > i.r...@dc... | University of Sheffield, UK > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > GATE-users mailing list > GAT...@li... > https://lists.sourceforge.net/lists/listinfo/gate-users |