MCPcopy Create free account
hub / github.com/TalwalkarLab/leaf / bag_of_words

Function bag_of_words

models/utils/language_utils.py:100–115  ·  view source on GitHub ↗

returns bag of words representation of given phrase using given vocab Args: line: string representing phrase to be parsed vocab: dictionary with words as keys and indices as values Return: integer list

(line, vocab)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

process_xMethod · 0.90

Calls 1

split_lineFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…