Package ca.phon.dict.cmn
Class ToneFixes
java.lang.Object
ca.phon.dict.cmn.ToneFixes
- All Implemented Interfaces:
IPALookupPostProcessor
,IPluginExtensionPoint<IPALookupPostProcessor>
public class ToneFixes
extends Object
implements IPALookupPostProcessor, IPluginExtensionPoint<IPALookupPostProcessor>
This class will perform the following transformations:
- σ²¹⁴ sandhi
- Any σ²¹⁴ followed by another σ²¹⁴ has tone changed to ³⁵
- Phonex:
(σ:tn("214"))(?>σ:tn("214"))
- Replace:
\1³⁵
- Phonex:
- Any σ²¹⁴ followed by a σ with tone *not* 214 has tone changed to ²¹
- Phonex:
(σ:tn("214"))(?>σ:tn("not 214"))
- Replace:
\1²¹
- Phonex:
- Any σ²¹⁴ followed by another σ²¹⁴ has tone changed to ³⁵
- i⁵⁵ sandhi
- i⁵⁵ followed by any σ⁵¹ has tone changed to ³⁵
- Phonex:
(\Si:tn("55"))(?>σ:tn("51"))
- Replace:
\1³⁵
- Phonex:
- i⁵⁵ followed by anything has tone changed to ⁵¹
- Phonex:
(\Si:tn("55"))(?>\S.+)
- Replace:
\1⁵¹
- Phonex:
- i⁵⁵ followed by any σ⁵¹ has tone changed to ³⁵
- pu⁵¹ sandhi
- pu⁵¹ followed by any σ⁵¹ has tone changed to ³⁵
- Phonex:
(\Spu:tn("51"))(?>σ:tn("51"))
- Replace:
\1³⁵
- Phonex:
- pu⁵¹ followed by any σ⁵¹ has tone changed to ³⁵
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClass<?>
Get type of extensionGet factory for extension point objectsi55Sandhi
(String fullOrtho, IPATranscript fullIpa) '一' sandhi* i⁵⁵ followed by any σ⁵¹ has tone changed to ³⁵ Phonex:(\Si:tn("55"))(?>σ:tn("51"))
Replace:\1³⁵
i⁵⁵ followed by anything has tone changed to ⁵¹ Phonex:(\Si:tn("55"))(?>\S.+)
Replace:\1⁵¹
postProcess
(IPADictionary dictionary, String orthography, IPATranscript transcript) Apply rules/transformations to givenIPATranscript
object using given information.pu51Sandhi
(String fullOrtho, IPATranscript fullIpa) '不' sandhi pu⁵¹ followed by any σ⁵¹ has tone changed to ³⁵ Phonex:(\Spu:tn("51"))(?>σ:tn("51"))
Replace:\1³⁵
σ²¹⁴ sandhi Any σ²¹⁴ followed by another σ²¹⁴ has tone changed to ³⁵ Phonex:(σ:tn("214"))(?>σ:tn("214"))
Replace:\1³⁵
Any σ²¹⁴ followed by a σ with tone *not* 214 has tone changed to ²¹ Phonex:(σ:tn("214"))(?>σ:tn("not 214"))
Replace:\1²¹
-
Constructor Details
-
ToneFixes
public ToneFixes()
-
-
Method Details
-
postProcess
public IPATranscript postProcess(IPADictionary dictionary, String orthography, IPATranscript transcript) Description copied from interface:IPALookupPostProcessor
Apply rules/transformations to givenIPATranscript
object using given information. This is executed during IPA Lookup/automatic transcription before the value is assigned to the tier.- Specified by:
postProcess
in interfaceIPALookupPostProcessor
-
tone214Sandhi
σ²¹⁴ sandhi- Any σ²¹⁴ followed by another σ²¹⁴ has tone changed to ³⁵
- Phonex:
(σ:tn("214"))(?>σ:tn("214"))
- Replace:
\1³⁵
- Phonex:
- Any σ²¹⁴ followed by a σ with tone *not* 214 has tone changed to ²¹
- Phonex:
(σ:tn("214"))(?>σ:tn("not 214"))
- Replace:
\1²¹
- Phonex:
- Parameters:
ipa
-- Returns:
- Any σ²¹⁴ followed by another σ²¹⁴ has tone changed to ³⁵
-
i55Sandhi
'一' sandhi*- i⁵⁵ followed by any σ⁵¹ has tone changed to ³⁵
- Phonex:
(\Si:tn("55"))(?>σ:tn("51"))
- Replace:
\1³⁵
- Phonex:
- i⁵⁵ followed by anything has tone changed to ⁵¹
- Phonex:
(\Si:tn("55"))(?>\S.+)
- Replace:
\1⁵¹
- Phonex:
- i⁵⁵ followed by any σ⁵¹ has tone changed to ³⁵
-
pu51Sandhi
'不' sandhi- pu⁵¹ followed by any σ⁵¹ has tone changed to ³⁵
- Phonex:
(\Spu:tn("51"))(?>σ:tn("51"))
- Replace:
\1³⁵
- Phonex:
- Parameters:
orthography
-ipa
-- Returns:
- pu⁵¹ followed by any σ⁵¹ has tone changed to ³⁵
-
getExtensionType
Description copied from interface:IPluginExtensionPoint
Get type of extension- Specified by:
getExtensionType
in interfaceIPluginExtensionPoint<IPALookupPostProcessor>
-
getFactory
Description copied from interface:IPluginExtensionPoint
Get factory for extension point objects- Specified by:
getFactory
in interfaceIPluginExtensionPoint<IPALookupPostProcessor>
-