genienlp/utils/lang_utils.py

8 lines
224 B
Python
Raw Normal View History

import os
import numpy
def get_functions(program):
2018-11-29 18:17:25 +00:00
return [x for x in program.split(' ') if x.startswith('@')]
def get_devices(program):
return [x.rsplit('.', 1)[0] for x in program.split(' ') if x.startswith('@')]