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

Function _word_to_index

models/utils/language_utils.py:61–73  ·  view source on GitHub ↗

returns index of given word based on given lookup dictionary returns the length of the lookup dictionary if word not found Args: word: string indd: dictionary with string words as keys and int indices as values

(word, indd)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…