コード例 #1
0
        private static bool bLireMot(List <string> lstMots, int iNumMot,
                                     ref clsMotExistant mot)
        {
            mot = new clsMotExistant();
            mot.iNumMotExistant = iNumMot;
            int iNumSegment = (iNumMot * clsMotExistant.iNbColonnes);

            mot.sMot            = lstMots[iNumSegment + clsMotExistant.iColMot];
            mot.sDef            = lstMots[iNumSegment + clsMotExistant.iColDef];
            mot.sPrefixe        = lstMots[iNumSegment + clsMotExistant.iColPrefixe];
            mot.sSuffixe        = lstMots[iNumSegment + clsMotExistant.iColSuffixe];
            mot.sNivPrefixe     = lstMots[iNumSegment + clsMotExistant.iColNivPrefixe];
            mot.iNivPrefixe     = int.Parse(mot.sNivPrefixe);
            mot.sNivSuffixe     = lstMots[iNumSegment + clsMotExistant.iColNivSuffixe];
            mot.iNivSuffixe     = int.Parse(mot.sNivSuffixe);
            mot.sUnicitePrefixe = lstMots[iNumSegment + clsMotExistant.iColUnicitePrefixe];
            mot.sUniciteSuffixe = lstMots[iNumSegment + clsMotExistant.iColUniciteSuffixe];
            mot.sFreqPrefixe    = lstMots[iNumSegment + clsMotExistant.iColFreqPrefixe];
            mot.sFreqSuffixe    = lstMots[iNumSegment + clsMotExistant.iColFreqSuffixe];

            // 01/05/2019
            mot.bElisionPrefixe = false;
            if (clsConst.bElision && mot.sPrefixe.EndsWith(clsConst.sCarElisionO))
            {
                mot.bElisionPrefixe = true;
                mot.sPrefixe        = mot.sPrefixe.Replace(clsConst.sCarElisionO, clsConst.sCarO);
            }

            mot.ParserDefinition();
            mot.Synthese();
            return(true);
        }