def _v(self, token, previous=None, next=None):
def f(v, s1, s2):<EOL><INDENT>if s2: <EOL><INDENT>v[s1 + "<STR_LIT:U+0020>" + s2] = <NUM_LIT:1><EOL><DEDENT><DEDENT>p, n = previous, next<EOL>p = ("<STR_LIT>", "<STR_LIT>") if not p else (p[<NUM_LIT:0>] or "<STR_LIT>", p[<NUM_LIT:1>] or "<STR_LIT>")<EOL>n = ("<STR_LIT>", "<STR_LIT>") if not n else (n[<NUM_LIT:0>] or "<STR_LIT>", n[<NUM_LIT:1>] or "<STR_LIT>")<EOL>v = {}<EOL>f(v,  "<STR_LIT:b>", "<STR_LIT:b>")         <EOL>f(v,  "<STR_LIT:h>", token[<NUM_LIT:0>])    <EOL>f(v,  "<STR_LIT:w>", token[-<NUM_LIT:6>:] if token not in self.known or token in self.unknown else "<STR_LIT>")<EOL>f(v,  "<STR_LIT:x>", token[-<NUM_LIT:3>:])  <EOL>f(v, "<STR_LIT>", p[<NUM_LIT:0>][-<NUM_LIT:3>:])   <EOL>f(v, "<STR_LIT>", n[<NUM_LIT:0>][-<NUM_LIT:3>:])   <EOL>f(v, "<STR_LIT>", p[<NUM_LIT:1>])        <EOL>f(v, "<STR_LIT>", p[<NUM_LIT:1>] + n[<NUM_LIT:1>]) <EOL>f(v, "<STR_LIT>", n[<NUM_LIT:1>])        <EOL>return v<EOL>
Returns a training vector for the given (word, tag)-tuple and its context.