Example #1
0
        public mynewconcept()
        {
            Concept concept = new Concept();

            Words words = new Words("KEELAN");
        }
Example #2
0
        public void parseSentence(string sentence)
        {
            int i, b, c;

            //Could do a string split.
            for (i = 0, b = 0, c = 0; i < sentence.Length; i++)
            {
                switch (sentence[i])
                {
                case ' ':
                    if (c > 0)
                    {
                    }
                    else
                    {
                        b++;
                    }
                    c++;
                    break;

                case '.':
                    if (c > 0)
                    {
                    }
                    else
                    {
                        b++;
                    }
                    c++;
                    break;

                case ',':
                    if (c > 0)
                    {
                    }
                    else
                    {
                        b++;
                    }
                    c++;
                    break;

                case ';':
                    if (c > 0)
                    {
                    }
                    else
                    {
                        b++;
                    }
                    c++;
                    break;

                default:
                    words[b] += sentence[i];
                    c         = 0;
                    break;
                }
            }


            System.Console.WriteLine(b);

            setSize(b);
            for (i = 0; i <= b; i++)
            {
                setWord(words[i], i);
                setClean(words[i]);
                wordtype[i] = new Words(words[i]);
                System.Console.WriteLine(wordtype[i].getType());
            }

            sendout(wordtype);
        }
Example #3
0
        public void parseSentence(string sentence)
        {
            int i, b ,c;
            //Could do a string split.
            for(i = 0, b = 0, c =0 ; i < sentence.Length; i++)
            {
                switch (sentence[i])
                {
                    case ' ':
                        if (c > 0) { }
                        else { b++; }
                        c++;
                        break;
                    case '.':
                        if (c > 0) { }
                        else { b++; }
                        c++;
                        break;
                    case ',':
                        if (c > 0) { }
                        else { b++; }
                        c++;
                        break;
                    case ';':
                        if (c > 0) { }
                        else { b++; }
                        c++;
                        break;
                    default:
                        words[b] += sentence[i];
                        c = 0;
                        break;
                }

            }

            System.Console.WriteLine(b);

            setSize(b);
            for(i =0; i <= b; i++)
            {
                setWord(words[i], i);
                setClean(words[i]);
                wordtype[i] = new Words(words[i]);
                System.Console.WriteLine(wordtype[i].getType());
            }

            sendout(wordtype);
        }
Example #4
0
        public mynewconcept()
        {
            Concept concept = new Concept();

            Words words = new Words("KEELAN");
        }
Example #5
0
        public void sendout(Words[] mywordTypes)
        {
            string returntype = "";
            for(int i= 0; i <= getSize(); i++)
            {
                setType(mywordTypes[i].getType(), i);
                returntype += mywordTypes[i].getType() + " /";

            }

            setReturn(returntype);
        }