Returns a word instance for the hit if the "sought" word is found in the text.
        Per default the "lemma" view of the words is compared.
        You can specify the desired view with the optional "view" option.
174193
def find(self, sought, view='lemma'):
        '''
        
        '''
        hits = []
        for sentence in self._sentences:
            hits += sentence.find(sought, view)
        return hits
449382
def _match_exists(self, searchable):
        
        position_searchable = self.get_position_searchable()
        for pos,val in position_searchable.iteritems():
            if val == searchable:
                return pos
        return False
942007
def search(self, text, lookup=None):
        '''
'''
        q = self._clone()
        q.text = (text, lookup)
        return q
105130
def search(self, text, lookup=None):
        ''''''
        return self.query().search(text, lookup=lookup)
1057281
def get(self, term, default=None):
        """"""
        v =  self.find_first(term)

        if not v:
            return default
        else:
            return v
358248
private List<AnalyzedToken> getSubstantivatedForms(String word, List<String> sentenceTokens, int pos) {
    if (word.endsWith("er")) {
      List<TaggedWord> lowerCaseTags = getWordTagger().tag(word.toLowerCase());
      // do not add tag words whose lower case variant is an adverb (e.g, "Früher") to avoid false negatives for DE_CASE
      if (lowerCaseTags.stream().anyMatch(t -> t.getPosTag().startsWith("ADV"))) {
        return null;
      }
      int idx = sentenceTokens.indexOf(word);
      // is followed by an uppercase word? If 'yes', the word is probably not substantivated
      while (++idx < sentenceTokens.size()) {
        String nextWord = sentenceTokens.get(idx);
        if (StringUtils.isWhitespace(nextWord)) {
          continue;
        }
        if (nextWord.length() > 0 && (Character.isUpperCase(nextWord.charAt(0)) || "als".equals(nextWord))) {
          return null;
        }
        break;
      }
      String femaleForm = word.substring(0, word.length()-1);
      List<TaggedWord> taggedFemaleForm = getWordTagger().tag(femaleForm);
      boolean isSubstantivatedForm = taggedFemaleForm.stream().anyMatch(t -> t.getPosTag().equals("SUB:NOM:SIN:FEM:ADJ"));
      if (isSubstantivatedForm) {
        List<AnalyzedToken> list = new ArrayList<>();
        list.add(new AnalyzedToken(word, "SUB:NOM:SIN:MAS:ADJ", word));
        list.add(new AnalyzedToken(word, "SUB:GEN:PLU:MAS:ADJ", word));
        //list.add(new AnalyzedToken(word, "SUB:NOM:SIN:MAS", word));
        return list;
      }
    }
    return null;
  }
355390
def get_word(self, word=None):
        '''  '''
        word = word if not word == None else self.initial
        if not self.terminal in word:
            if len(word) > self.average_word_length and \
                    self.terminal in self.links[word[-self.chunk_size:]] \
                    and random.randint(0, 1):
                addon = self.terminal
            else:
                options = self.links[word[-self.chunk_size:]]
                addon = random.choice(options)

            word = word + addon
            return self.get_word(word)
        return word[1:-1]
964116
def contains_text(expected_text)
      assert_exists

      case expected_text
      when Regexp
        value() =~ expected_text
      when String
        value().index(expected_text)
      else
        raise TypeError, "expected String or Regexp, got #{expected_text.inspect}:#{expected_text.class}"
      end
    end
814305
def get_case(word, correction):
    
    if word.istitle():
        return correction.title()
    if word.isupper():
        return correction.upper()
    if correction == word and not word.islower():
        return word
    if len(word) > 2 and word[:2].isupper():
        return correction.title()
    if not known_as_lower([correction]): #expensive
        try:
            return CASE_MAPPED[correction]
        except KeyError:
            pass
    return correction
477112
def search_word(confluence, word):
    
    cql = "siteSearch ~ {} order by created".format(word)
    answers = confluence.cql(cql)
    for answer in answers.get('results'):
        print(answer)
89005
def findAction( self, text ):
        
        for action in self.actionGroup().actions():
            if ( text in (action.objectName(), action.text()) ):
                return action
        return None
161587
def words(self, index = None):
        
        if index is None:
            return self.select(Word,None,True,default_ignore_structure)
        else:
            if index < 0:
                index = self.count(Word,None,True,default_ignore_structure) + index
            for i, e in enumerate(self.select(Word,None,True,default_ignore_structure)):
                if i == index:
                    return e
            raise IndexError
1050104
function(word, labels) {
    let links = this.root.links
    let text = word.text
    // If the word has tags, it is a parameter.
    if (word.tags.length > 0) {
      links = this.root.paramLinks
      text = word.tags[0]
    }
    if (links.has(text)) {
      // That word already exists.
      // Use it, and complement it with the word's tags.
      let node = links.get(text).target
      labels.forEach(label => {
        if (!node.labelTags.has(label)) {
          node.labelTags.set(label, [])
        }
        let tags = node.labelTags.get(label)
        word.tags.forEach(tag => {
          if (tags.indexOf(tag) === -1) {
            tags.push(tag)
          }
        })
      })
      return node
    } else {
      links.set(text, new Link(this.brain,
        new Node(this.brain, word, labels, this.root)))
      return links.get(text).target
    }
  }
1153272
def findViewWithTextOrRaise(self, text, root="ROOT"):
        '''
        
        '''

        if DEBUG:
            print >>sys.stderr, "findViewWithTextOrRaise(%s, %s)" % (text, root)
        view = self.findViewWithText(text, root)
        if view:
            return view
        else:
            raise ViewNotFoundException("text", text, root)
404176
def search(cls, term, weights=None, with_score=False, score_alias='score',
               explicit_ordering=False):
        """"""
        return cls._search(
            term,
            weights,
            with_score,
            score_alias,
            cls.rank,
            explicit_ordering)
361882
def get_lemmas(self, word, pos=None, ignore_case=False):
        
        entries = self.get_entries(word, pos, ignore_case)
        lemmas = list(set([entry["Lemma"] for entry in entries]))
        return sorted(lemmas)
707322
def find_tracked_words(self, tokens):
        
        tracked_words = []

        for i in range(len(tokens)):
            for j in range(i + 1, len(tokens) + 1):
                phrase = tokens[i:j]
                status = self.has_tokens(phrase)

                if status is not None:
                    if status is True:
                        tracked_words.append(TokenTrie.Token(phrase, i, j - 1))
                    elif status is False:
                        break

        return tracked_words