CoEDL / elpis

🙊 software for creating speech recognition models.
https://elpis.readthedocs.io/en/latest/
Apache License 2.0
152 stars 33 forks source link

Remove sort -u from model.py , but we still need only unique values #55

Closed benfoley closed 5 years ago

benfoley commented 5 years ago

Currently using bash, with sort -u. This is problematic because the order is significant, so that for example, aa can take precedence over a in the example below:

aa a:
a a

Current script is:

cmd = f"grep -v '^#' < {self.pron_dict.l2s_path} | cut -d' ' -f2 | grep -v '^$' | sort -u"

Should be able to do it with python!

benfoley commented 5 years ago

Fixed with fa349bfbf6789b286bc4d408e85715ccb1b4f843