final FSArray childArray = FSCollectionFactory.createFSArray(aJCas, splitChildren); if (parentSplit == null) { compound.setSplits(childArray);
public synchronized static Search createSearch(JCas jcas, String query, List<SearchResult> hitList, AbstractQuery abstractQuery, String searchId) { Search ret = new Search(jcas); ret.setQuery(query); ret.setHitList(FSCollectionFactory.createFSArray(jcas, hitList)); ret.setAbstractQuery(abstractQuery); ret.setSearchId(searchId); return ret; }
parent.children.add(wrapper.constituent); wrapper.constituent.setChildren(FSCollectionFactory.createFSArray(getJCas(), wrapper.children)); wrapper.constituent.addToIndexes(); ConstituentWrapper rootWrapper = constituents.pop(); rootWrapper.constituent.setEnd(getBuffer().length()); rootWrapper.constituent.setChildren(FSCollectionFactory.createFSArray( getJCas(), rootWrapper.children)); rootWrapper.constituent.addToIndexes();
tsd.setTags(FSCollectionFactory.createFSArray(jcas, tags)); tsd.addToIndexes();
e.getKey().setArguments(FSCollectionFactory.createFSArray(aJCas, e.getValue()));
parent.setChildren(createFSArray(aJCas, new Constituent[] { constituent })); generatedParent = true; constituent.setChildren(createFSArray(aJCas, children)); constituent.setParent(parent); constituent.addToIndexes();
public synchronized static TripleSearchResult createTripleSearchResult(JCas jcas, Triple triple, String uri, double score, String text, int rank, String queryString, String searchId, Collection<CandidateAnswerVariant> candidateAnswers) { TripleSearchResult ret = new TripleSearchResult(jcas); ret.setTriple(triple); ret.setUri(uri); ret.setScore(score); ret.setText(text); ret.setRank(rank); ret.setQueryString(queryString); ret.setSearchId(searchId); ret.setCandidateAnswers(FSCollectionFactory.createFSArray(jcas, candidateAnswers)); return ret; }
public synchronized static ConceptSearchResult createConceptSearchResult(JCas jcas, Concept concept, String uri, double score, String text, int rank, String queryString, String searchId, Collection<CandidateAnswerVariant> candidateAnswers) { ConceptSearchResult ret = new ConceptSearchResult(jcas); ret.setConcept(concept); ret.setUri(uri); ret.setScore(score); ret.setText(text); ret.setRank(rank); ret.setQueryString(queryString); ret.setSearchId(searchId); ret.setCandidateAnswers(FSCollectionFactory.createFSArray(jcas, candidateAnswers)); return ret; }
FSCollectionFactory.createFSArray(jcas, arguments));
parent.setChildren(createFSArray(aJCas, new Constituent[] { constituent })); generatedParent = true; constituent.setBegin(offsets[0]); constituent.setEnd(offsets[1]); constituent.setChildren(createFSArray(aJCas, children)); constituent.setParent(parent); constituent.addToIndexes();
public static void makeLinkHostFS(JCas aJCas, int aBegin, int aEnd, FeatureStructure... aLinks) { Type hostType = aJCas.getTypeSystem().getType(HOST_TYPE); AnnotationFS hostA1 = aJCas.getCas().createAnnotation(hostType, aBegin, aEnd); hostA1.setFeatureValue(hostType.getFeatureByBaseName("links"), FSCollectionFactory.createFSArray(aJCas, asList(aLinks))); aJCas.getCas().addFsToIndexes(hostA1); }
pred.setArguments(FSCollectionFactory.createFSArray(aJCas, args));
pred.setArguments(FSCollectionFactory.createFSArray(aJCas, args));
private static AnnotationFS makeLinkHostFS(JCas aJCas, String aType, int aBegin, int aEnd, FeatureStructure... aLinks) { Type hostType = aJCas.getTypeSystem().getType(aType); AnnotationFS hostA1 = aJCas.getCas().createAnnotation(hostType, aBegin, aEnd); if (aLinks != null) { hostA1.setFeatureValue(hostType.getFeatureByBaseName("links"), FSCollectionFactory.createFSArray(aJCas, asList(aLinks))); } aJCas.getCas().addFsToIndexes(hostA1); return hostA1; }
public static void makeLinkHostFS(JCas aJCas, int aBegin, int aEnd, FeatureStructure... aLinks) { Type hostType = aJCas.getTypeSystem().getType(HOST_TYPE); AnnotationFS hostA1 = aJCas.getCas().createAnnotation(hostType, aBegin, aEnd); hostA1.setFeatureValue(hostType.getFeatureByBaseName("links"), FSCollectionFactory.createFSArray(aJCas, asList(aLinks))); aJCas.getCas().addFsToIndexes(hostA1); }
public static AnnotationFS makeLinkHostMultiSPanFeatureFS(JCas aJCas, int aBegin, int aEnd, Feature aSpanFeature, String aValue, FeatureStructure... aLinks) { Type hostType = aJCas.getTypeSystem().getType(HOST_TYPE); AnnotationFS hostA1 = aJCas.getCas().createAnnotation(hostType, aBegin, aEnd); hostA1.setFeatureValue(hostType.getFeatureByBaseName("links"), FSCollectionFactory.createFSArray(aJCas, asList(aLinks))); hostA1.setStringValue(aSpanFeature, aValue); aJCas.getCas().addFsToIndexes(hostA1); return hostA1; }
public static AnnotationFS makeLinkHostMultiSPanFeatureFS(JCas aJCas, int aBegin, int aEnd, Feature aSpanFeature, String aValue, FeatureStructure... aLinks) { Type hostType = aJCas.getTypeSystem().getType(HOST_TYPE); AnnotationFS hostA1 = aJCas.getCas().createAnnotation(hostType, aBegin, aEnd); hostA1.setFeatureValue(hostType.getFeatureByBaseName("links"), FSCollectionFactory.createFSArray(aJCas, asList(aLinks))); hostA1.setStringValue(aSpanFeature, aValue); aJCas.getCas().addFsToIndexes(hostA1); return hostA1; }
public synchronized static Document createDocument(JCas jcas, String uri, double score, String text, int rank, String queryString, String searchId, Collection<CandidateAnswerVariant> candidateAnswers, String title, String docId, List<String> sections, List<String> sectionLabels) { Document ret = new Document(jcas); ret.setUri(uri); ret.setScore(score); ret.setText(text); ret.setRank(rank); ret.setQueryString(queryString); ret.setSearchId(searchId); ret.setCandidateAnswers(FSCollectionFactory.createFSArray(jcas, candidateAnswers)); ret.setTitle(title); ret.setDocId(docId); ret.setSections((StringArray) FSCollectionFactory.createStringArray(jcas, sections)); ret.setSectionLabels((StringArray) FSCollectionFactory.createStringArray(jcas, sectionLabels)); return ret; }
public synchronized static Passage createPassage(JCas jcas, String uri, double score, String text, int rank, String queryString, String searchId, Collection<CandidateAnswerVariant> candidateAnswers, String title, String docId, int offsetInBeginSection, int offsetInEndSection, String beginSection, String endSection, String aspects) { Passage ret = new Passage(jcas); ret.setUri(uri); ret.setScore(score); ret.setText(text); ret.setRank(rank); ret.setQueryString(queryString); ret.setSearchId(searchId); ret.setCandidateAnswers(FSCollectionFactory.createFSArray(jcas, candidateAnswers)); ret.setTitle(title); ret.setDocId(docId); ret.setOffsetInBeginSection(offsetInBeginSection); ret.setOffsetInEndSection(offsetInEndSection); ret.setBeginSection(beginSection); ret.setEndSection(endSection); ret.setAspects(aspects); return ret; }
FSArray childArray = FSCollectionFactory.createFSArray(aJCas, childAnnotations); constAnno.setChildren(childArray);