~TermList: The direct children of the `Term`.
173177
def children(self):
        
        if self._children is None:
            topdowns = tuple(Relationship.topdown())
            self._children = TermList()
            self._children.extend(
                [ other
                    for rship,others in six.iteritems(self.relations)
                        for other in others
                            if rship in topdowns
                ]
            )
        return self._children
510291
def handle_term(self, _, __, tokens: ParseResults) -> ParseResults:
        """"""
        self.ensure_node(tokens)
        return tokens
884912
def visit_listcomp(self, node):
        """"""
        return "[%s %s]" % (
            node.elt.accept(self),
            " ".join(n.accept(self) for n in node.generators),
        )
669793
def names(self):
        """"""
        if is_term(self.terms):
            return frozenset([self.terms.name])
        return frozenset(term.name for term in com.flatten(self.terms))
1359428
def _handle_dl_term(self):
        """"""
        self._context ^= contexts.DL_TERM
        if self._read() == ":":
            self._handle_list_marker()
        else:
            self._emit_text("\n")
441524
public List<WordTag> process(List list) {
    List<IN> featureLabels = new ArrayList<IN>();
    for (Object o : list) {
      CoreLabel wi = new CoreLabel();
      if (o instanceof HasWord) {
        wi.setWord(((HasWord) o).word());
        if (o instanceof HasTag) {
          wi.setTag(((HasTag) o).tag());
        }
      } else {
        wi.setWord(o.toString());
      }
      featureLabels.add((IN) wi);
    }
    List<IN> tagged = classify(featureLabels);
    List<WordTag> out = new ArrayList<WordTag>();
    for (CoreLabel wi : tagged) {
      out.add(new WordTag(wi.word(), wi.get(AnswerAnnotation.class)));
    }
    return out;
  }
723533
def find(self, sought, view='lemma'):
        '''
        
        '''
        for word in self.wordlist:
            if sought == word.views[view]:
                yield word
506968
def _phrase_query(self, term_list, field_name, field_type):
        
        term_list = [self._term_query(term, field_name, field_type,
                                      stemmed=False) for term in term_list]

        query = xapian.Query(xapian.Query.OP_PHRASE, term_list)
        return query
92875
def _include_term_list(self, termlist):
        
        ref_needed = False
        for term in termlist:
            ref_needed = ref_needed or self._include_term(term)
        return ref_needed
465860
def children(self):
        """""""
        for c in self.table.columns:
            if c.parent == self.name and  not c.valuetype_class.is_label():
                yield c
954716
def on_term(term_node)
      if defined? @separate_by_comma
        remove_instance_variable(:@separate_by_comma)
      end
      process(term_node.function)
      bel_string << '('
      term_node.arguments.each { |arg| process(arg) }
      bel_string << ')'
    end
732326
def p_term_div(self, tree):
        ''' '''
        tree.value = convertstr(tree[0].value) / tree[2].value
1054939
def generate_terms(self, ref, root, file_type=None):
        

        last_section = root
        t = None

        if isinstance(ref, Source):
            row_gen = ref
            ref_path = row_gen.__class__.__name__
        else:
            row_gen = get_generator(ref)
            ref_path = ref.path


        try:
            for line_n, row in enumerate(row_gen, 1):

                if not row or not row[0] or not row[0].strip() or row[0].strip().startswith('#'):
                    continue

                tt = Term(row[0], None) # Just to get the qualified name constructed property

                term_class = self.get_term_class(tt.join_lc)

                t = term_class(tt.join_lc,
                         row[1] if len(row) > 1 else '',
                         row[2:] if len(row) > 2 else [],
                         row=line_n,
                         col=1,
                         file_name=ref_path, file_type=file_type, doc=self.doc)

                # Why did we remove comments from values? It strips out Markdown
                #if t.value and str(t.value).startswith('#'): # Comments are ignored
                #    continue

                if t.term_is('include') or t.term_is('declare'):

                    if t.term_is('include'):
                        resolved = self.find_include_doc(dirname(ref_path), t.value.strip())
                    else:
                        resolved = self.find_declare_doc(dirname(ref_path), t.value.strip())

                    if row_gen.ref == resolved:
                        raise IncludeError("Include loop for '{}' ".format(resolved))

                    yield t

                    try:

                        sub_gen = get_generator(resolved.get_resource().get_target())

                        for t in self.generate_terms(sub_gen, root, file_type=t.record_term_lc):
                            yield t

                        if last_section:
                            yield last_section  # Re-assert the last section

                    except IncludeError as e:
                        e.term = t
                        raise

                    except (OSError,  FileNotFoundError, GenerateError, DownloadError) as e:
                        e = IncludeError("Failed to Include; {}".format(e))
                        e.term = t
                        raise e

                    continue  # Already yielded the include/declare term, and includes can't have children

                elif t.term_is('section'):

                    # If there is already a section in the document, emit the existing section,
                    # rather than a new one.
                    try:
                        last_section = self.doc[t.name]
                        t = last_section

                    except (KeyError, TypeError): # TypeError -> self.doc is None
                        last_section = t

                yield t

                # Yield any child terms, from the term row arguments
                if not t.term_is('section') and not t.term_is('header'):
                    for col, value in enumerate(t.args, 0):
                        if str(value).strip():

                            term_name = t.record_term_lc + '.' + str(col)

                            term_class = self.get_term_class(term_name)

                            yield term_class(term_name, str(value), [],
                                       row=line_n,
                                       col=col + 2,  # The 0th argument starts in col 2
                                       file_name=ref_path,
                                       file_type=file_type,
                                       parent=t) #,
                                       #doc=None,
                                       #section=last_section)
        except IncludeError as e:
            exc = IncludeError(str(e) + "; in '{}' ".format(ref_path))
            exc.term = e.term if hasattr(e, 'term') else None
            raise exc
638019
private void indexTerms(Set<String> termSet) {
        for (String term : termSet) {
            m_dbTran.addTermIndexColumn(m_tableDef, m_dbObj, m_fieldName, term);
        }
    }
846779
@Override
	public Collection<String> getSuggestions(String term) {

		List<String> suggestions = new ArrayList<>();
		for (Alternative alternative : getAlternatives(term)) {
			suggestions.add(alternative.getSuggestion());
		}
		return suggestions;
	}
758643
public static void apply(List<Term> termList)
    {
        ListIterator<Term> listIterator = termList.listIterator();
        while (listIterator.hasNext())
        {
            if (shouldRemove(listIterator.next())) listIterator.remove();
        }
    }
359412
public List<OntologyTerm> getChildren(OntologyTerm ontologyTerm) {
    Iterable<org.molgenis.ontology.core.meta.OntologyTerm> ontologyTermEntities =
        () ->
            dataService
                .query(ONTOLOGY_TERM, org.molgenis.ontology.core.meta.OntologyTerm.class)
                .eq(ONTOLOGY_TERM_IRI, ontologyTerm.getIRI())
                .findAll()
                .iterator();

    List<OntologyTerm> children = new ArrayList<>();
    for (Entity ontologyTermEntity : ontologyTermEntities) {
      Entity ontologyEntity = ontologyTermEntity.getEntity(OntologyTermMetadata.ONTOLOGY);
      ontologyTermEntity
          .getEntities(OntologyTermMetadata.ONTOLOGY_TERM_NODE_PATH)
          .forEach(
              ontologyTermNodePathEntity ->
                  children.addAll(
                      getChildOntologyTermsByNodePath(ontologyEntity, ontologyTermNodePathEntity)));
    }
    return children;
  }