Exemplo n.º 1
0
        public async Task FunctionHandler(DynamoDBEvent dynamoEvent, ILambdaContext context)
        {
            LOGGER.log       = MoycaLogger.GetLogger(context, LogLevel.TRACE);
            scopeAndSequence = new ScopeAndSequenceDB(LOGGER.log);
            dictionary       = new DictionaryDB(LOGGER.log);
            int i;

            for (i = 1057; i < 1058; i++)
            {
                await GetAndSetWords(i);
            }
            LOGGER.log.INFO("Function", "Words in range: " + totalWords);
        }
Exemplo n.º 2
0
        private async Task GetAttributes(string word)
        {
            Log.INFO("WordAttributes", "GetAttributes", word);

            dictionaryDB = new DictionaryDB(Log);

            DatabaseItem items = await dictionaryDB.GetWordAttributesFromDictionary(word);

            if (items.TryGetValue("ConsonantBlend", out AttributeValue cb))
            {
                this.ConsonantBlend = cb.S;
            }

            if (items.TryGetValue("ConsonantDigraph", out AttributeValue cd))
            {
                this.ConsonantDigraph = cd.S;
            }

            if (items.TryGetValue("FirstLetter", out AttributeValue fl))
            {
                this.FirstLetter = fl.S;
            }

            if (items.TryGetValue("Sentence", out AttributeValue se))
            {
                this.Sentence = se.S;
            }

            if (items.TryGetValue("Syllables", out AttributeValue sy))
            {
                this.Syllables = sy.S;
            }

            if (items.TryGetValue("Vowel", out AttributeValue v))
            {
                this.Vowel = v.S;
            }

            if (items.TryGetValue("VowelBlend", out AttributeValue vb))
            {
                this.VowelBlend = vb.S;
            }

            if (items.TryGetValue("VowelPhoneme", out AttributeValue vp))
            {
                this.VowelPhoneme = vp.S;
            }

            if (items.TryGetValue("VowelType", out AttributeValue vt))
            {
                this.VowelType = vt.S;
            }


            if (items.TryGetValue("WordFamily", out AttributeValue wf))
            {
                this.WordFamily = wf.S;
            }

            if (items.TryGetValue("Word", out AttributeValue w))
            {
                this.Word = w.S;
            }
        }