code
stringlengths
73
34.1k
label
stringclasses
1 value
private static Object digIn(Object target, String field) { if (target instanceof List) { // The 'field' will tell us what type of objects belong in the list. @SuppressWarnings("unchecked") List<Object> list = (List<Object>) target; return digInList(list, field); ...
java
private static void setValue(Object target, String field, Object value) { // TODO: Should we do this for all numbers, not just '0'? if ("0".equals(field)) { if (!(target instanceof Collection)) { throw new IllegalArgumentException( "Cannot evaluate '0...
java
private static Method findMethod( Object target, String name, Class<?> parameterType) { for (Method method : target.getClass().getMethods()) { if (!method.getName().equals(name)) { continue; } Class<?>[] parameters = metho...
java
public static boolean isMultiValuedPath(List<String> expression) { for (String element : expression) { if ("*".equals(element) || element.startsWith("*:")) { return true; } } return false; }
java
public synchronized boolean load( AmazonWebServiceRequest request, ResultCapture<?> extractor) { if (attributes != null) { return false; } ActionModel action = resourceModel.getLoadAction(); if (action == null) { throw new UnsupportedOper...
java
public ActionResult performAction( String name, AmazonWebServiceRequest request, ResultCapture<?> extractor) { ActionModel action = resourceModel.getAction(name); if (action == null) { throw new UnsupportedOperationException( "Resource...
java
public T build() { C clientObject = client; if (clientObject == null) { clientObject = createClient(); } return factory.create(clientObject); }
java
public ResourcePageImpl nextPage(ResultCapture<Object> extractor) { if (getNextToken() == null) { throw new NoSuchElementException("There is no next page"); } ActionResult result = ActionUtils.perform( context, listActionModel, request...
java
public Lemma getLemma() { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_lemma == null) jcasType.jcas.throwFeatMissing("lemma", "de.julielab.jules.types.Token"); return (Lemma)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Token_Type)jcasType).casFeatCode_lemma)));}
java
public void setLemma(Lemma v) { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_lemma == null) jcasType.jcas.throwFeatMissing("lemma", "de.julielab.jules.types.Token"); jcasType.ll_cas.ll_setRefValue(addr, ((Token_Type)jcasType).casFeatCode_lemma, jcasType.ll_cas.ll_getFSRef(v));}
java
public String getOrthogr() { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_orthogr == null) jcasType.jcas.throwFeatMissing("orthogr", "de.julielab.jules.types.Token"); return jcasType.ll_cas.ll_getStringValue(addr, ((Token_Type)jcasType).casFeatCode_orthogr);}
java
public void setOrthogr(String v) { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_orthogr == null) jcasType.jcas.throwFeatMissing("orthogr", "de.julielab.jules.types.Token"); jcasType.ll_cas.ll_setStringValue(addr, ((Token_Type)jcasType).casFeatCode_orthogr, v);}
java
public FSArray getDepRel() { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_depRel == null) jcasType.jcas.throwFeatMissing("depRel", "de.julielab.jules.types.Token"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Token_Type)jcasType).casFeatCode_depRel)...
java
public void setDepRel(FSArray v) { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_depRel == null) jcasType.jcas.throwFeatMissing("depRel", "de.julielab.jules.types.Token"); jcasType.ll_cas.ll_setRefValue(addr, ((Token_Type)jcasType).casFeatCode_depRel, jcasType.ll_cas.ll_getFSRef(v));}
java
public DependencyRelation getDepRel(int i) { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_depRel == null) jcasType.jcas.throwFeatMissing("depRel", "de.julielab.jules.types.Token"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Token_Type)jcasType).casFeatCode_depRel),...
java
public void setDepRel(int i, DependencyRelation v) { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_depRel == null) jcasType.jcas.throwFeatMissing("depRel", "de.julielab.jules.types.Token"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Token_Type)jcasType).casFeatCode...
java
public String getLemmaStr() { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_lemmaStr == null) jcasType.jcas.throwFeatMissing("lemmaStr", "de.julielab.jules.types.Token"); return jcasType.ll_cas.ll_getStringValue(addr, ((Token_Type)jcasType).casFeatCode_lemmaStr);}
java
public void setLemmaStr(String v) { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_lemmaStr == null) jcasType.jcas.throwFeatMissing("lemmaStr", "de.julielab.jules.types.Token"); jcasType.ll_cas.ll_setStringValue(addr, ((Token_Type)jcasType).casFeatCode_lemmaStr, v);}
java
public String getTopicIds() { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_topicIds == null) jcasType.jcas.throwFeatMissing("topicIds", "de.julielab.jules.types.Token"); return jcasType.ll_cas.ll_getStringValue(addr, ((Token_Type)jcasType).casFeatCode_topicIds);}
java
public void setTopicIds(String v) { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_topicIds == null) jcasType.jcas.throwFeatMissing("topicIds", "de.julielab.jules.types.Token"); jcasType.ll_cas.ll_setStringValue(addr, ((Token_Type)jcasType).casFeatCode_topicIds, v);}
java
public void setArguments(FSArray v) { if (RelationMention_Type.featOkTst && ((RelationMention_Type)jcasType).casFeat_arguments == null) jcasType.jcas.throwFeatMissing("arguments", "de.julielab.jules.types.RelationMention"); jcasType.ll_cas.ll_setRefValue(addr, ((RelationMention_Type)jcasType).casFeatCode_...
java
public void setArguments(int i, ArgumentMention v) { if (RelationMention_Type.featOkTst && ((RelationMention_Type)jcasType).casFeat_arguments == null) jcasType.jcas.throwFeatMissing("arguments", "de.julielab.jules.types.RelationMention"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr...
java
public Set<String> editMention(String mention) { Set<String> result = new HashSet<String>(); // tokenize StringTokenizer tokens = new StringTokenizer(mention, delims, false); List<String> tokenList = new LinkedList<String>(); if (tokens.countTokens() < 3) return resu...
java
public String getResolved() { if (Coordination_Type.featOkTst && ((Coordination_Type)jcasType).casFeat_resolved == null) jcasType.jcas.throwFeatMissing("resolved", "de.julielab.jules.types.Coordination"); return jcasType.ll_cas.ll_getStringValue(addr, ((Coordination_Type)jcasType).casFeatCode_resolved);}
java
public void setResolved(String v) { if (Coordination_Type.featOkTst && ((Coordination_Type)jcasType).casFeat_resolved == null) jcasType.jcas.throwFeatMissing("resolved", "de.julielab.jules.types.Coordination"); jcasType.ll_cas.ll_setStringValue(addr, ((Coordination_Type)jcasType).casFeatCode_resolved, v);...
java
public boolean getElliptical() { if (Coordination_Type.featOkTst && ((Coordination_Type)jcasType).casFeat_elliptical == null) jcasType.jcas.throwFeatMissing("elliptical", "de.julielab.jules.types.Coordination"); return jcasType.ll_cas.ll_getBooleanValue(addr, ((Coordination_Type)jcasType).casFeatCode_elli...
java
public void setElliptical(boolean v) { if (Coordination_Type.featOkTst && ((Coordination_Type)jcasType).casFeat_elliptical == null) jcasType.jcas.throwFeatMissing("elliptical", "de.julielab.jules.types.Coordination"); jcasType.ll_cas.ll_setBooleanValue(addr, ((Coordination_Type)jcasType).casFeatCode_ellip...
java
public void log() { System.out.println("Lemmatiser: " + (lemmatiser == null ? null : lemmatiser.getClass().getName())); System.out.println("POSTagger: " + (posTagger == null ? null : posTagger.getClass().getName())); System.out.println("Tokenizer: " + tokenizer.getClass().getName()); System.out.println("T...
java
protected double scoreCombination(double[] multiScore) { double sum = 0.0; for (int i=0; i<multiScore.length; i++) { sum += multiScore[i]; } return sum/multiScore.length; }
java
protected String explainScoreCombination(double[] multiScore) { StringBuffer buf = new StringBuffer(""); PrintfFormat fmt = new PrintfFormat(" %.3f"); buf.append("field-level scores ["); for (int i=0; i<multiScore.length; i++) { buf.append(fmt.sprintf(multiScore[i])); } buf.append("] Average score:"); ...
java
public boolean accept(File f) { if (f.isDirectory()) { return false; } String name = f.getName().toLowerCase(); return name.endsWith(".pdf"); }
java
public Annotation getFirstEntity() { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_firstEntity == null) jcasType.jcas.throwFeatMissing("firstEntity", "ch.epfl.bbp.uima.types.Cooccurrence"); return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, (...
java
public void setFirstEntity(Annotation v) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_firstEntity == null) jcasType.jcas.throwFeatMissing("firstEntity", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.ll_cas.ll_setRefValue(addr, ((Cooccurrence_Type)jcasType).casFeatCode_firs...
java
public Annotation getSecondEntity() { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_secondEntity == null) jcasType.jcas.throwFeatMissing("secondEntity", "ch.epfl.bbp.uima.types.Cooccurrence"); return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr...
java
public void setSecondEntity(Annotation v) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_secondEntity == null) jcasType.jcas.throwFeatMissing("secondEntity", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.ll_cas.ll_setRefValue(addr, ((Cooccurrence_Type)jcasType).casFeatCode_s...
java
public int getSnippetBegin() { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_snippetBegin == null) jcasType.jcas.throwFeatMissing("snippetBegin", "ch.epfl.bbp.uima.types.Cooccurrence"); return jcasType.ll_cas.ll_getIntValue(addr, ((Cooccurrence_Type)jcasType).casFeatCode_snippet...
java
public void setSnippetBegin(int v) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_snippetBegin == null) jcasType.jcas.throwFeatMissing("snippetBegin", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.ll_cas.ll_setIntValue(addr, ((Cooccurrence_Type)jcasType).casFeatCode_snippetB...
java
public int getSnippetEnd() { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_snippetEnd == null) jcasType.jcas.throwFeatMissing("snippetEnd", "ch.epfl.bbp.uima.types.Cooccurrence"); return jcasType.ll_cas.ll_getIntValue(addr, ((Cooccurrence_Type)jcasType).casFeatCode_snippetEnd);}
java
public void setSnippetEnd(int v) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_snippetEnd == null) jcasType.jcas.throwFeatMissing("snippetEnd", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.ll_cas.ll_setIntValue(addr, ((Cooccurrence_Type)jcasType).casFeatCode_snippetEnd, v)...
java
public StringArray getFirstIds() { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_firstIds == null) jcasType.jcas.throwFeatMissing("firstIds", "ch.epfl.bbp.uima.types.Cooccurrence"); return (StringArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Cooccu...
java
public void setFirstIds(StringArray v) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_firstIds == null) jcasType.jcas.throwFeatMissing("firstIds", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.ll_cas.ll_setRefValue(addr, ((Cooccurrence_Type)jcasType).casFeatCode_firstIds, jc...
java
public String getFirstIds(int i) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_firstIds == null) jcasType.jcas.throwFeatMissing("firstIds", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Cooccurrence_Type)jcasType)...
java
public void setFirstIds(int i, String v) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_firstIds == null) jcasType.jcas.throwFeatMissing("firstIds", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Cooccurrence_Type)...
java
public StringArray getSecondIds() { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_secondIds == null) jcasType.jcas.throwFeatMissing("secondIds", "ch.epfl.bbp.uima.types.Cooccurrence"); return (StringArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Coo...
java
public void setSecondIds(StringArray v) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_secondIds == null) jcasType.jcas.throwFeatMissing("secondIds", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.ll_cas.ll_setRefValue(addr, ((Cooccurrence_Type)jcasType).casFeatCode_secondIds...
java
public String getSecondIds(int i) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_secondIds == null) jcasType.jcas.throwFeatMissing("secondIds", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Cooccurrence_Type)jcasTy...
java
public void setSecondIds(int i, String v) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_secondIds == null) jcasType.jcas.throwFeatMissing("secondIds", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Cooccurrence_Ty...
java
public String getCooccurrenceType() { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_cooccurrenceType == null) jcasType.jcas.throwFeatMissing("cooccurrenceType", "ch.epfl.bbp.uima.types.Cooccurrence"); return jcasType.ll_cas.ll_getStringValue(addr, ((Cooccurrence_Type)jcasType).c...
java
public void setCooccurrenceType(String v) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_cooccurrenceType == null) jcasType.jcas.throwFeatMissing("cooccurrenceType", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.ll_cas.ll_setStringValue(addr, ((Cooccurrence_Type)jcasType).ca...
java
public float getConfidence() { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_confidence == null) jcasType.jcas.throwFeatMissing("confidence", "ch.epfl.bbp.uima.types.Cooccurrence"); return jcasType.ll_cas.ll_getFloatValue(addr, ((Cooccurrence_Type)jcasType).casFeatCode_confidenc...
java
public void setConfidence(float v) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_confidence == null) jcasType.jcas.throwFeatMissing("confidence", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.ll_cas.ll_setFloatValue(addr, ((Cooccurrence_Type)jcasType).casFeatCode_confidence...
java
public boolean getHasInteraction() { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_hasInteraction == null) jcasType.jcas.throwFeatMissing("hasInteraction", "ch.epfl.bbp.uima.types.Cooccurrence"); return jcasType.ll_cas.ll_getBooleanValue(addr, ((Cooccurrence_Type)jcasType).casFe...
java
public void setHasInteraction(boolean v) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_hasInteraction == null) jcasType.jcas.throwFeatMissing("hasInteraction", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.ll_cas.ll_setBooleanValue(addr, ((Cooccurrence_Type)jcasType).casFea...
java
public int getPresent() { if (MultipleProteins_Type.featOkTst && ((MultipleProteins_Type)jcasType).casFeat_present == null) jcasType.jcas.throwFeatMissing("present", "ch.epfl.bbp.uima.types.MultipleProteins"); return jcasType.ll_cas.ll_getIntValue(addr, ((MultipleProteins_Type)jcasType).casFeatCode_presen...
java
public void setPresent(int v) { if (MultipleProteins_Type.featOkTst && ((MultipleProteins_Type)jcasType).casFeat_present == null) jcasType.jcas.throwFeatMissing("present", "ch.epfl.bbp.uima.types.MultipleProteins"); jcasType.ll_cas.ll_setIntValue(addr, ((MultipleProteins_Type)jcasType).casFeatCode_present...
java
public void persist(File file) throws IOException { //System.err.println("Writting "+wordMap.size()+" words and "+gramSet.size()+" n-grams"); DataOutputStream output = new DataOutputStream(new GZIPOutputStream(new FileOutputStream(file))); output.writeUTF(FILE_TYPE); System.err.println("pruning from "+w...
java
public String getAce_subtype() { if (Value_Type.featOkTst && ((Value_Type)jcasType).casFeat_ace_subtype == null) jcasType.jcas.throwFeatMissing("ace_subtype", "de.julielab.jules.types.ace.Value"); return jcasType.ll_cas.ll_getStringValue(addr, ((Value_Type)jcasType).casFeatCode_ace_subtype);}
java
public static <T> T deserialize(byte[] b, Class<T> clazz) { try ( Pool<Kryo, RuntimeException>.Entry entry = kryoPool.borrow(); Input input = new Input(b); ) { T t = entry.getObject().readObject(input, clazz); entry.setValid(true); return t; } catch (KryoException e) { Log.w(e.getMessag...
java
public static StringDistance[] buildArray(String classNames) { String classNamesArray[] = split(classNames); StringDistance learners[] = new StringDistance[classNamesArray.length]; for (int i = 0; i < classNamesArray.length; i++) { learners[i] = build(classNamesArray[i]).getDistance(); } re...
java
static public void main(String[] args) { try { if (args[0].indexOf('/')>0) { System.out.println(build(args[0])); } else { System.out.println(build(args)); } } catch (Exception e) { e.printStackTrace(); } }
java
public FSArray getRelatedArticles() { if (RelatedArticleList_Type.featOkTst && ((RelatedArticleList_Type)jcasType).casFeat_relatedArticles == null) jcasType.jcas.throwFeatMissing("relatedArticles", "de.julielab.jules.types.RelatedArticleList"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_c...
java
public void setRelatedArticles(FSArray v) { if (RelatedArticleList_Type.featOkTst && ((RelatedArticleList_Type)jcasType).casFeat_relatedArticles == null) jcasType.jcas.throwFeatMissing("relatedArticles", "de.julielab.jules.types.RelatedArticleList"); jcasType.ll_cas.ll_setRefValue(addr, ((RelatedArticleLi...
java
public RelatedArticle getRelatedArticles(int i) { if (RelatedArticleList_Type.featOkTst && ((RelatedArticleList_Type)jcasType).casFeat_relatedArticles == null) jcasType.jcas.throwFeatMissing("relatedArticles", "de.julielab.jules.types.RelatedArticleList"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll...
java
public void setRelatedArticles(int i, RelatedArticle v) { if (RelatedArticleList_Type.featOkTst && ((RelatedArticleList_Type)jcasType).casFeat_relatedArticles == null) jcasType.jcas.throwFeatMissing("relatedArticles", "de.julielab.jules.types.RelatedArticleList"); jcasType.jcas.checkArrayBounds(jcasType....
java
public FSArray getItemList() { if (List_Type.featOkTst && ((List_Type)jcasType).casFeat_itemList == null) jcasType.jcas.throwFeatMissing("itemList", "de.julielab.jules.types.List"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((List_Type)jcasType).casFeatCode_itemL...
java
public void setItemList(FSArray v) { if (List_Type.featOkTst && ((List_Type)jcasType).casFeat_itemList == null) jcasType.jcas.throwFeatMissing("itemList", "de.julielab.jules.types.List"); jcasType.ll_cas.ll_setRefValue(addr, ((List_Type)jcasType).casFeatCode_itemList, jcasType.ll_cas.ll_getFSRef(v));}
java
public ListItem getItemList(int i) { if (List_Type.featOkTst && ((List_Type)jcasType).casFeat_itemList == null) jcasType.jcas.throwFeatMissing("itemList", "de.julielab.jules.types.List"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((List_Type)jcasType).casFeatCode_itemList), i); ...
java
public void setItemList(int i, ListItem v) { if (List_Type.featOkTst && ((List_Type)jcasType).casFeat_itemList == null) jcasType.jcas.throwFeatMissing("itemList", "de.julielab.jules.types.List"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((List_Type)jcasType).casFeatCode_itemLis...
java
public void setAce_subtype(String v) { if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_ace_subtype == null) jcasType.jcas.throwFeatMissing("ace_subtype", "de.julielab.jules.types.ace.Entity"); jcasType.ll_cas.ll_setStringValue(addr, ((Entity_Type)jcasType).casFeatCode_ace_subtype, v);}
java
public String getAce_class() { if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_ace_class == null) jcasType.jcas.throwFeatMissing("ace_class", "de.julielab.jules.types.ace.Entity"); return jcasType.ll_cas.ll_getStringValue(addr, ((Entity_Type)jcasType).casFeatCode_ace_class);}
java
public void setAce_class(String v) { if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_ace_class == null) jcasType.jcas.throwFeatMissing("ace_class", "de.julielab.jules.types.ace.Entity"); jcasType.ll_cas.ll_setStringValue(addr, ((Entity_Type)jcasType).casFeatCode_ace_class, v);}
java
public FSArray getEntity_mentions() { if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_entity_mentions == null) jcasType.jcas.throwFeatMissing("entity_mentions", "de.julielab.jules.types.ace.Entity"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Entity...
java
public void setEntity_mentions(FSArray v) { if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_entity_mentions == null) jcasType.jcas.throwFeatMissing("entity_mentions", "de.julielab.jules.types.ace.Entity"); jcasType.ll_cas.ll_setRefValue(addr, ((Entity_Type)jcasType).casFeatCode_entity_mention...
java
public EntityMention getEntity_mentions(int i) { if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_entity_mentions == null) jcasType.jcas.throwFeatMissing("entity_mentions", "de.julielab.jules.types.ace.Entity"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Entity_Type)...
java
public void setEntity_mentions(int i, EntityMention v) { if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_entity_mentions == null) jcasType.jcas.throwFeatMissing("entity_mentions", "de.julielab.jules.types.ace.Entity"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Ent...
java
public FSArray getEntity_attributes() { if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_entity_attributes == null) jcasType.jcas.throwFeatMissing("entity_attributes", "de.julielab.jules.types.ace.Entity"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((...
java
public void setEntity_attributes(FSArray v) { if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_entity_attributes == null) jcasType.jcas.throwFeatMissing("entity_attributes", "de.julielab.jules.types.ace.Entity"); jcasType.ll_cas.ll_setRefValue(addr, ((Entity_Type)jcasType).casFeatCode_entity_a...
java
public EntityAttribute getEntity_attributes(int i) { if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_entity_attributes == null) jcasType.jcas.throwFeatMissing("entity_attributes", "de.julielab.jules.types.ace.Entity"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Enti...
java
public void setEntity_attributes(int i, EntityAttribute v) { if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_entity_attributes == null) jcasType.jcas.throwFeatMissing("entity_attributes", "de.julielab.jules.types.ace.Entity"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(add...
java
public String getTarget() { if (Link_Type.featOkTst && ((Link_Type)jcasType).casFeat_target == null) jcasType.jcas.throwFeatMissing("target", "de.julielab.jules.types.wikipedia.Link"); return jcasType.ll_cas.ll_getStringValue(addr, ((Link_Type)jcasType).casFeatCode_target);}
java
public void setTarget(String v) { if (Link_Type.featOkTst && ((Link_Type)jcasType).casFeat_target == null) jcasType.jcas.throwFeatMissing("target", "de.julielab.jules.types.wikipedia.Link"); jcasType.ll_cas.ll_setStringValue(addr, ((Link_Type)jcasType).casFeatCode_target, v);}
java
private String[] getLoadline( Pair<BrainRegionDictTerm, BrainRegionDictTerm> pair, int pmId) { BrainRegionDictTerm br1 = pair.getKey(); BrainRegionDictTerm br2 = pair.getValue(); return new String[] { pmId + "",// br1.getEntityId(), br1.getBegin() + "", br1.getEnd()...
java
public void setOntologyId(String v) { if (NeurotransmitterProp_Type.featOkTst && ((NeurotransmitterProp_Type)jcasType).casFeat_ontologyId == null) jcasType.jcas.throwFeatMissing("ontologyId", "neuroner.NeuroNER.NeurotransmitterProp"); jcasType.ll_cas.ll_setStringValue(addr, ((NeurotransmitterProp_Type)jca...
java
public Span[] tokenizePos(String d) { Span[] tokens = split(d); newTokens.clear(); tokProbs.clear(); for (int i = 0, il = tokens.length; i < il; i++) { Span s = tokens[i]; String tok = d.substring(s.getStart(), s.getEnd()); // Can't tokenize single characters if (tok.length() < 2...
java
public String[] tokenize(String s) { Span[] spans = tokenizePos(s); String[] toks = new String[spans.length]; for (int ti = 0, tl = toks.length; ti < tl; ti++) { toks[ti] = s.substring(spans[ti].getStart(), spans[ti].getEnd()); } return toks; }
java
private Mention getMention(int tokenIndex) { Mention mention = null; for (Mention mention2 : mentions) { if (mention2.contains(tokenIndex)) if (mention == null) mention = mention2; else throw new Ill...
java
public String[] getContext(Object o) { String sb = (String)((ObjectIntPair)o).a; int id = ((ObjectIntPair)o).b; List preds = new ArrayList(); preds.add("p="+sb.substring(0,id)); preds.add("s="+sb.substring(id)); if (id>0) { addCharPreds("p1", sb.charAt(id-1), preds); if (id>1) { addCharPreds("p2",...
java
public String getMin() { if (TIMEX_Type.featOkTst && ((TIMEX_Type)jcasType).casFeat_min == null) jcasType.jcas.throwFeatMissing("min", "de.julielab.jules.types.muc7.TIMEX"); return jcasType.ll_cas.ll_getStringValue(addr, ((TIMEX_Type)jcasType).casFeatCode_min);}
java
public Map<String, String> extractAbbrPairs(String inputText, boolean isFileName) { if (isFileName) { return extractAbbrPairs(inputText); } StringReader sr = new StringReader(inputText); return extractAbbrPairs(sr); }
java
public List<java.lang.Object> getLastNameOrForeNameOrInitialsOrSuffixOrNameIDOrCollectiveName() { if (lastNameOrForeNameOrInitialsOrSuffixOrNameIDOrCollectiveName == null) { lastNameOrForeNameOrInitialsOrSuffixOrNameIDOrCollectiveName = new ArrayList<java.lang.Object>(); } return thi...
java
public Protein getProtein() { if (CellTypeProteinConcentration_Type.featOkTst && ((CellTypeProteinConcentration_Type)jcasType).casFeat_protein == null) jcasType.jcas.throwFeatMissing("protein", "ch.epfl.bbp.uima.types.CellTypeProteinConcentration"); return (Protein)(jcasType.ll_cas.ll_getFSForRef(jcasType...
java
public void setProtein(Protein v) { if (CellTypeProteinConcentration_Type.featOkTst && ((CellTypeProteinConcentration_Type)jcasType).casFeat_protein == null) jcasType.jcas.throwFeatMissing("protein", "ch.epfl.bbp.uima.types.CellTypeProteinConcentration"); jcasType.ll_cas.ll_setRefValue(addr, ((CellTypePro...
java
public Concentration getConcentration() { if (CellTypeProteinConcentration_Type.featOkTst && ((CellTypeProteinConcentration_Type)jcasType).casFeat_concentration == null) jcasType.jcas.throwFeatMissing("concentration", "ch.epfl.bbp.uima.types.CellTypeProteinConcentration"); return (Concentration)(jcasType....
java
public void setConcentration(Concentration v) { if (CellTypeProteinConcentration_Type.featOkTst && ((CellTypeProteinConcentration_Type)jcasType).casFeat_concentration == null) jcasType.jcas.throwFeatMissing("concentration", "ch.epfl.bbp.uima.types.CellTypeProteinConcentration"); jcasType.ll_cas.ll_setRefV...
java
public CellType getCelltype() { if (CellTypeProteinConcentration_Type.featOkTst && ((CellTypeProteinConcentration_Type)jcasType).casFeat_celltype == null) jcasType.jcas.throwFeatMissing("celltype", "ch.epfl.bbp.uima.types.CellTypeProteinConcentration"); return (CellType)(jcasType.ll_cas.ll_getFSForRef(jca...
java
public void setCelltype(CellType v) { if (CellTypeProteinConcentration_Type.featOkTst && ((CellTypeProteinConcentration_Type)jcasType).casFeat_celltype == null) jcasType.jcas.throwFeatMissing("celltype", "ch.epfl.bbp.uima.types.CellTypeProteinConcentration"); jcasType.ll_cas.ll_setRefValue(addr, ((CellTyp...
java
public boolean getProjective() { if (DependencyRelation_Type.featOkTst && ((DependencyRelation_Type)jcasType).casFeat_projective == null) jcasType.jcas.throwFeatMissing("projective", "de.julielab.jules.types.DependencyRelation"); return jcasType.ll_cas.ll_getBooleanValue(addr, ((DependencyRelation_Type)jc...
java
public void setProjective(boolean v) { if (DependencyRelation_Type.featOkTst && ((DependencyRelation_Type)jcasType).casFeat_projective == null) jcasType.jcas.throwFeatMissing("projective", "de.julielab.jules.types.DependencyRelation"); jcasType.ll_cas.ll_setBooleanValue(addr, ((DependencyRelation_Type)jca...
java
public java.util.List<Object> getAddressOrAlternativesOrArray() { if (addressOrAlternativesOrArray == null) { addressOrAlternativesOrArray = new ArrayList<Object>(); } return this.addressOrAlternativesOrArray; }
java
public java.util.List<RefList> getRefList() { if (refList == null) { refList = new ArrayList<RefList>(); } return this.refList; }
java