MCPcopy Create free account
hub / github.com/jasperproject/jasper-client / parseDirections

Function parseDirections

client/modules/Weather.py:20–28  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

18 """
19
20 def parseDirections(text):
21 words = {
22 'N': 'north',
23 'S': 'south',
24 'E': 'east',
25 'W': 'west',
26 }
27 output = [words[w] for w in list(text)]
28 return ' '.join(output)
29 acronyms = re.findall(r'\b([NESW]+)\b', text)
30
31 for w in acronyms:

Callers 1

replaceAcronymsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected