File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -186,12 +186,16 @@ class LexiconFromTextFileJob(Job):
186186 without checking the output manually on new lexica.
187187 """
188188
189- def __init__ (self , text_file , compressed = True ):
189+ __sis_hash_exclude__ = {"variation" : "context" }
190+
191+ def __init__ (self , text_file , compressed = True , variation = "context" ):
190192 """
191193 :param Path text_file:
192194 :param compressed: save as .xml.gz
195+ :param variation: variation to be added to phonemes
193196 """
194197 self .text_file = text_file
198+ self .variation = variation
195199
196200 self .out_bliss_lexicon = self .output_path ("lexicon.xml.gz" if compressed else "lexicon.xml" )
197201
@@ -224,7 +228,7 @@ def run(self):
224228 lex .add_lemma (lemma )
225229
226230 for phoneme in sorted (phonemes ):
227- lex .add_phoneme (phoneme )
231+ lex .add_phoneme (phoneme , variation = self . variation )
228232
229233 write_xml (self .out_bliss_lexicon .get_path (), lex .to_xml ())
230234
You can’t perform that action at this time.
0 commit comments