Package edu.upf.taln.dri.lib.model.util
Class ObjectGenerator
- java.lang.Object
-
- edu.upf.taln.dri.lib.model.util.ObjectGenerator
-
public class ObjectGenerator extends Object
Generates objects of the library starting from the original GATE document annotations
-
-
Constructor Summary
Constructors Constructor Description ObjectGenerator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BabelSynsetOcc
getBabelnetSynsetOccFromId(Integer annotationId, DocCacheManager cacheManager)
Babelnet synset occurrence Generator methodstatic CandidateTermOcc
getCandidateTermOccFromId(Integer annotationId, DocCacheManager cacheManager)
Candidate term Generator methodstatic Citation
getCitationFromBibEntry(gate.Annotation bibEntryAnn, DocCacheManager cacheManager)
Citations of document Generator methodstatic Map<Integer,List<Map<Integer,Set<Integer>>>>
getCorefTokenIDsets(DocCacheManager cacheManager)
Get a map with all the set of node IDs that are equivalent (i.e.static DependencyGraph
getDepGraphFromSentId(Integer annotationId, DocCacheManager cacheManager, boolean mergeNodes)
Dependency Graph of sentence Generator methodstatic Header
getHeaderFromDocument(gate.Document gateDoc, DocCacheManager cacheManager)
Header of document Generator methodstatic Section
getSectionContainingSentenceId(Integer sentenceId, DocCacheManager cacheManager)
Get the Section element that contains the sentence with the given Idstatic Section
getSectionFromId(Integer annotationId, DocCacheManager cacheManager)
Section Generator methodstatic Sentence
getSentenceFromId(Integer annotationId, DocCacheManager cacheManager)
Sentence Generator methodstatic List<Token>
getTokensFromSentenceId(Integer sentenceId, DocCacheManager cacheManager)
Return the list of tokens given a sentence ID
-
-
-
Method Detail
-
getSentenceFromId
public static Sentence getSentenceFromId(Integer annotationId, DocCacheManager cacheManager)
Sentence Generator method- Parameters:
annotationId
-cacheManager
-- Returns:
-
getTokensFromSentenceId
public static List<Token> getTokensFromSentenceId(Integer sentenceId, DocCacheManager cacheManager)
Return the list of tokens given a sentence ID- Parameters:
annotationId
-cacheManager
-- Returns:
-
getSectionFromId
public static Section getSectionFromId(Integer annotationId, DocCacheManager cacheManager)
Section Generator method- Parameters:
annotationId
-baseDoc
-- Returns:
-
getSectionContainingSentenceId
public static Section getSectionContainingSentenceId(Integer sentenceId, DocCacheManager cacheManager)
Get the Section element that contains the sentence with the given Id- Parameters:
sentenceId
-cacheManager
-- Returns:
-
getCandidateTermOccFromId
public static CandidateTermOcc getCandidateTermOccFromId(Integer annotationId, DocCacheManager cacheManager)
Candidate term Generator method- Parameters:
annotationId
-baseDoc
-- Returns:
-
getBabelnetSynsetOccFromId
public static BabelSynsetOcc getBabelnetSynsetOccFromId(Integer annotationId, DocCacheManager cacheManager)
Babelnet synset occurrence Generator method- Parameters:
annotationId
-baseDoc
-- Returns:
-
getDepGraphFromSentId
public static DependencyGraph getDepGraphFromSentId(Integer annotationId, DocCacheManager cacheManager, boolean mergeNodes)
Dependency Graph of sentence Generator method- Parameters:
annotationId
-cacheManager
-mergeNodes
-- Returns:
-
getCorefTokenIDsets
public static Map<Integer,List<Map<Integer,Set<Integer>>>> getCorefTokenIDsets(DocCacheManager cacheManager)
Get a map with all the set of node IDs that are equivalent (i.e. that belong to the same co-reference chain). * KEY: identifier of coref chain (integer) VALUE: List of elements of the coreference chain, each element is a Map with: - KEY: unambiguous id of the coreference chain element - VALUE: set of token IDs (integer) that the coreference chain element includes.- Parameters:
cacheManager
-- Returns:
-
getHeaderFromDocument
public static Header getHeaderFromDocument(gate.Document gateDoc, DocCacheManager cacheManager)
Header of document Generator method- Parameters:
annotationId
-cacheManager
-- Returns:
-
getCitationFromBibEntry
public static Citation getCitationFromBibEntry(gate.Annotation bibEntryAnn, DocCacheManager cacheManager)
Citations of document Generator method- Parameters:
annotationId
-cacheManager
-- Returns:
-
-