in data_parsing.py [0:0]
def process_gloss(line):
depth = len(line)-len(line.lstrip('#')) #to get number of # at beginning of line
line = line.strip('#').strip()
#strip out tags, comments
gloss = re.sub(r'{{lb.*?}}', '', line).strip()
gloss = re.sub(r'<!--.*?-->', '', gloss).strip()
gloss = clean_text(gloss)
#ignore senses with no gloss or only tags in gloss (not text)
if len(gloss) == 0 or len(re.sub(r'\(.*?\)\.?', '', gloss.strip())) == 0:
return -1, -1, -1
#parse tags
tags = []
t = re.search(r'{{lb(.*?)}}', line)
if t:
tags = t.group(1).strip().split('|')[1:]
return gloss, depth, tags