Get most important words in `node`.
327824
function getImportantWords(node) {
  var words = {}

  visit(node, 'WordNode', visitor)

  return words

  function visitor(word, index, parent) {
    var match
    var stem

    if (isImportant(word)) {
      stem = stemNode(word)
      match = {
        node: word,
        index: index,
        parent: parent
      }

      if (!own.call(words, stem)) {
        words[stem] = {
          matches: [match],
          stem: stem,
          score: 1
        }
      } else {
        words[stem].matches.push(match)
        words[stem].score++
      }
    }
  }
}
868253
def _get_node(self):
        """"""
        data = self.meta.read(self.node_size)
        return PFSNode(data, self.endianness)
1155502
def visit_keyword(self, node):
        """"""
        if node.arg is None:
            return "**%s" % node.value.accept(self)
        return "%s=%s" % (node.arg, node.value.accept(self))
302502
def get_text_from_node(self, node, regex=None, group=1):
        """"""
        text = self._get_stripped_text_from_node(node)

        if regex is not None:
            text = self._filter_by_regex(regex, text, group)

        return text
969856
def get_node(self, key):
        """"""
        pos = self._get_node_pos(key)
        if pos is None:
            return None
        return self._hashring[self._sorted_keys[pos]]
1054512
def word_starts(self):
        """"""
        if not self.is_tagged(WORDS):
            self.tokenize_words()
        return self.starts(WORDS)
872368
function _getNodeText(node) {
    return node.sourceFile.text.substr(node.start, node.end - node.start);
}
259464
def getText(node, recursive=False):
    """"""
    L = [u'']
    for n in node.childNodes:
        if n.nodeType in (node.TEXT_NODE, node.CDATA_SECTION_NODE):
            L.append(n.data)
        else:
            if not recursive:
                return None
        L.append(getText(n))
    return u''.join(L)
792905
def topics(self):
        
        return set(node.tag for node in self.root.iter() if node.attrib)
793709
def get_taglist(node):
    
    return [re.sub(r'\{[^}]*\}', "", copy(subnode.tag))
            for subnode in node.nodes]
622898
def extract_sentences(nodes, token_node_indices):
    
    sents = []
    tokens = []
    for i, node in enumerate(nodes):
        if i in token_node_indices:
            if node.features['tiger.pos'] != '$.':
                tokens.append(i)
            else:  # start a new sentence, if 'tiger.pos' is '$.'
                tokens.append(i)
                sents.append(tokens)
                tokens = []
    return sents
793036
function(str, pos) {
    var T = this, k, child;
    if (str.length == 0) {
      if (pos === undefined) {
        return T.getAllWords(str);
      } else {
        return [];
      }
    }
    if (pos === undefined) {
      pos = 0;
    }
    k = str[pos];
    child = T.children[k];
    if (child === undefined) {
      //node doesn't exist
      return [];
    }
    if (pos === str.length - 1) {
      return child.getAllWords(str);
    }
    return child.autoComplete(str, pos + 1);
  }
897876
def __get_node(self, word):
		

		node = self.root
		for c in word:
			try:
				node = node.children[c]
			except KeyError:
				return None

		return node
857979
def get_known_words(self, lang):
        """"""
        words = []
        for topic in self.user_data.language_data[lang]['skills']:
            if topic['learned']:
                words += topic['words']
        return set(words)
983751
def visit_Tuple(self, node: AST, dfltChaining: bool = True) -> str:
        """"""
        elems = (self.visit(elt) for elt in node.elts)
        return f"({', '.join(elems)}{')' if len(node.elts) != 1 else ',)'}"
1050680
def _extract_all(node, name, limit_count=None):
    """"""

    seq = []

    for i in range(0, len(node.getElementsByTagName(name))):
        if len(seq) == limit_count:
            break

        seq.append(_extract(node, name, i))

    return seq
729118
def visit_keyword(self, node: AST, dfltChaining: bool = True) -> str:
        """"""
        arg = node.arg
        if arg is None:
            return f"**{self.visit(node.value)}"
        else:
            return f"{arg}={self.visit(node.value)}"