Example #1
0
        public void ReadData(string sCSVPath)
        {
            List <CSV> lstCSV = File.ReadAllLines(sCSVPath)
                                .Skip(1)
                                .Select(v => CSV.FromCsv(v))
                                .ToList();

            string sSubj = "";
            string sObj  = "";
            string col1val;
            string col2val;

            foreach (CSV csv in lstCSV)
            {
                sSubj   = "";
                sObj    = "";
                col1val = csv.Col1.Trim();
                col2val = csv.Col2.Trim();

                if (UtilMap.IsContains(col2val, "is a verb"))
                {
                    lstVerbs.Add(new Single(UtilMap.RemoveText(col2val, "is a verb")));
                }
                else if (UtilMap.IsContains(col2val, "behave similar as"))
                {
                    if (UtilMap.SuppressText(col2val, "behave similar as", ref sSubj, ref sObj))
                    {
                        lstSimilar.Add(new Map(sSubj, sObj, "behave"));
                    }
                }
                else if (UtilMap.IsContains(col2val, "is similar to"))
                {
                    if (UtilMap.SuppressText(col2val, "is similar to", ref sSubj, ref sObj))
                    {
                        lstSimilar.Add(new Map(sSubj, sObj, "is"));
                    }
                }
                else if (UtilMap.IsContains(col2val, "oppose with"))
                {
                    if (UtilMap.SuppressText(col2val, "oppose with", ref sSubj, ref sObj))
                    {
                        lstOpposite.Add(new Map(sSubj, sObj, "oppose"));
                    }
                }
                else if (UtilMap.IsContains(col2val, " can "))
                {
                    if (UtilMap.SuppressText(col2val, " can ", ref sSubj, ref sObj))
                    {
                        lstCans.Add(new Map(sSubj, sObj, "can"));
                    }
                }
            }
        }
Example #2
0
        public string GetProcessStatementType(string sFull)
        {
            string pType = "";

            foreach (string str in lstProcessVerbs)
            {
                if (UtilMap.IsContains(sFull, str))
                {
                    pType = UtilMap.GetFirstWord(str);
                    break;
                }
            }
            return(pType);
        }