Пример #1
0
 public Phoneme(float height, float backness, float roundedness)
 {
     IsVoiced          = true;
     ArticulationPlace = ConsonantPlace.None;
     ArticulationType  = Phonetics.ConsonantManner.Fricative;
     Height            = height;
     Backness          = backness;
     Roundedness       = roundedness;
 }
Пример #2
0
 public Phoneme(float height, float backness, float roundedness, bool voiced = true,
                ConsonantPlace artPlace = ConsonantPlace.None, ConsonantManner artType = Phonetics.ConsonantManner.Fricative)
 {
     IsVoiced          = voiced;
     Height            = height;
     Backness          = backness;
     Roundedness       = roundedness;
     ArticulationPlace = artPlace;
     ArticulationType  = artType;
 }
Пример #3
0
 public ConsonantMannerVertex(ConsonantManner manner)
 {
     _manner = manner;
 }
Пример #4
0
        private static bool GetConsonantPosition(Segment consonant, out ConsonantPlace place, out ConsonantManner manner, out bool voiced)
        {
            FeatureStruct fs = consonant.FeatureStruct;
            if (consonant.IsComplex)
                fs = consonant.FeatureStruct.GetValue<FeatureStruct>(CogFeatureSystem.First);

            var placeSymbol = (FeatureSymbol) fs.GetValue<SymbolicFeatureValue>("place");
            var mannerSymbol = (FeatureSymbol) fs.GetValue<SymbolicFeatureValue>("manner");
            var voiceSymbol = (FeatureSymbol) fs.GetValue<SymbolicFeatureValue>("voice");
            var nasalSymbol = (FeatureSymbol) fs.GetValue<SymbolicFeatureValue>("nasal");

            manner = default(ConsonantManner);
            voiced = false;

            if (!ConsonantPlaceLookup.TryGetValue(placeSymbol.ID, out place))
                return false;

            if (nasalSymbol.ID == "nasal+")
            {
                manner = ConsonantManner.Nasal;
            }
            else if (ConsonantMannerLookup.TryGetValue(mannerSymbol.ID, out manner))
            {
                var lateralSymbol = (FeatureSymbol) fs.GetValue<SymbolicFeatureValue>("lateral");
                if (lateralSymbol.ID == "lateral+")
                {
                    switch (manner)
                    {
                        case ConsonantManner.Fricative:
                            manner = ConsonantManner.LateralFricative;
                            break;
                        case ConsonantManner.Approximant:
                            manner = ConsonantManner.LateralApproximant;
                            break;
                    }
                }
            }
            else
            {
                return false;
            }

            voiced = voiceSymbol.ID == "voice+";

            return true;
        }
Пример #5
0
        private static bool GetConsonantPosition(Segment consonant, out ConsonantPlace place, out ConsonantManner manner, out bool voiced)
        {
            FeatureStruct fs = consonant.FeatureStruct;

            if (consonant.IsComplex)
            {
                fs = consonant.FeatureStruct.GetValue <FeatureStruct>(CogFeatureSystem.First);
            }

            var placeSymbol  = (FeatureSymbol)fs.GetValue <SymbolicFeatureValue>("place");
            var mannerSymbol = (FeatureSymbol)fs.GetValue <SymbolicFeatureValue>("manner");
            var voiceSymbol  = (FeatureSymbol)fs.GetValue <SymbolicFeatureValue>("voice");
            var nasalSymbol  = (FeatureSymbol)fs.GetValue <SymbolicFeatureValue>("nasal");

            manner = default(ConsonantManner);
            voiced = false;

            if (!ConsonantPlaceLookup.TryGetValue(placeSymbol.ID, out place))
            {
                return(false);
            }

            if (nasalSymbol.ID == "nasal+")
            {
                manner = ConsonantManner.Nasal;
            }
            else if (ConsonantMannerLookup.TryGetValue(mannerSymbol.ID, out manner))
            {
                var lateralSymbol = (FeatureSymbol)fs.GetValue <SymbolicFeatureValue>("lateral");
                if (lateralSymbol.ID == "lateral+")
                {
                    switch (manner)
                    {
                    case ConsonantManner.Fricative:
                        manner = ConsonantManner.LateralFricative;
                        break;

                    case ConsonantManner.Approximant:
                        manner = ConsonantManner.LateralApproximant;
                        break;
                    }
                }
            }
            else
            {
                return(false);
            }

            voiced = voiceSymbol.ID == "voice+";

            return(true);
        }
Пример #6
0
 public ConsonantMannerVertex(ConsonantManner manner)
 {
     _manner = manner;
 }
Пример #7
0
        private static void Consonant(string xsampa, ConsonantPlace place, ConsonantManner type, bool voiced)
        {
            var consonant = new Phoneme(place, type, voiced);

            _presetsXSAMPA[xsampa] = consonant;
        }
Пример #8
0
 public GlobalConsonantVertex(ConsonantPlace place, ConsonantManner manner, bool voiced)
 {
     _place = place;
     _manner = manner;
     _voiced = voiced;
 }
Пример #9
0
 public Phoneme(ConsonantPlace artPlace, ConsonantManner artType, bool voiced = false)
 {
     IsVoiced          = voiced;
     ArticulationPlace = artPlace;
     ArticulationType  = artType;
 }
Пример #10
0
 public GlobalConsonantVertex(ConsonantPlace place, ConsonantManner manner, bool voiced)
 {
     _place  = place;
     _manner = manner;
     _voiced = voiced;
 }