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
Constructors -
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 givenIPATranscriptobject 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:IPALookupPostProcessorApply rules/transformations to givenIPATranscriptobject using given information. This is executed during IPA Lookup/automatic transcription before the value is assigned to the tier.- Specified by:
postProcessin interfaceIPALookupPostProcessor- Parameters:
dictionary-orthography-transcript-
-
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:
fullOrtho-fullIpa-- Returns:
- pu⁵¹ followed by any σ⁵¹ has tone changed to ³⁵
-
getExtensionType
Description copied from interface:IPluginExtensionPointGet type of extension- Specified by:
getExtensionTypein interfaceIPluginExtensionPoint<IPALookupPostProcessor>
-
getFactory
Description copied from interface:IPluginExtensionPointGet factory for extension point objects- Specified by:
getFactoryin interfaceIPluginExtensionPoint<IPALookupPostProcessor>
-