MCPcopy Create free account
hub / github.com/awslabs/gap-text2sql / NL2CodeEncoderState

Class NL2CodeEncoderState

rat-sql-gap/seq2struct/models/nl2code/encoder.py:13–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12@attr.s
13class NL2CodeEncoderState:
14 state = attr.ib()
15 memory = attr.ib()
16 words = attr.ib()
17
18 def find_word_occurrences(self, word):
19 return [i for i, w in enumerate(self.words) if w == word]
20
21
22@registry.register('encoder', 'NL2Code')

Callers 1

forwardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected