Repository: UAlbertaALTLab/morphodict (language: python)

Issue:
Ensure "FST output style" is consistent, even if the FST has no output
There's a few things here:

 - the database importer seems to want to create a valid analysis string for every entry
 - entries to be imported _may not_ be analyzable by the FST (e.g., _pê-_)
 - the importer synthesizes an analysis from its declared wordclass

In the default case, the "FST output style" Title Cases all tags that are not noun or verb word classes:

https://github.com/UAlbertaALTLab/cree-intelligent-dictionary/blob/5b7ffa5f9ac1c649d2658e6b05b93714862d7a77/src/CreeDictionary/utils/enums.py#L102-L103

Is this... a good assumption? Should we change this assumption? Should we be synthesizing an analysis at all? Will the `WordClass` enum be scrapped in @andrewdotn's language generalization port?

Related: #814 — `+Ipv` was being generated here, although `crkeng.xml` has it as "IPV". This resulted in a failing test case.


Discussion / hints:

Fix patch:
diff --git a/src/CreeDictionary/res/crk.altlabel.tsv b/src/CreeDictionary/res/crk.altlabel.tsv
index a885b6f53..e2015e04e 100644
--- a/src/CreeDictionary/res/crk.altlabel.tsv
+++ b/src/CreeDictionary/res/crk.altlabel.tsv
@@ -178,7 +178,8 @@ IPJ	Interjection	Interjection	like: hay hay	tâpiskôc: hay hay	⚡
 IPN	Prenoun	Prenoun	like: amisko-	tâpiskôc: amisko-	⚡		
 IPP	Particle	Particle	like: akâmi-	tâpiskîc: akâmi- 	⚡️		
 IPV	Preverb	Preverb	like: pê-	tâpiskôc: pê-	⚡️		
-	Imm		Immediate	now	mêkwâc/kîsac		
+Ipv	Preverb	Preverb	like: pê-	tâpiskôc: pê-	⚡️		
+Imm		Immediate	now	mêkwâc/kîsac		
 Imp		Imperative	command/request	nitotamâkêwin			
 Imp+Imm		Immediate imperative	command/request that something happens immediately	nitotamâkêwin piko ka-ispayik			
 Ind		Independent	ni-/ki- word	ni-/ki- itwêwin			


Test patch:
diff --git a/src/CreeDictionary/tests/API_tests/model_test.py b/src/CreeDictionary/tests/API_tests/model_test.py
index 9b4267e60..83e18e97d 100644
--- a/src/CreeDictionary/tests/API_tests/model_test.py
+++ b/src/CreeDictionary/tests/API_tests/model_test.py
@@ -27,10 +27,8 @@ def test_when_linguistic_breakdown_absent():
     result = search_results[0]
     assert result.wordform.text == "pê-"
     assert result.wordform.analysis == "pê-+Ipv"
-    assert (
-        result.friendly_linguistic_breakdown_head == []
-        and result.friendly_linguistic_breakdown_tail == ["like: pê-"]
-    )
+    assert result.friendly_linguistic_breakdown_head == []
+    assert result.friendly_linguistic_breakdown_tail == ["like: pê-"]
 
 
 @pytest.mark.django_db