diff --git a/API.cs b/API.cs index 6062b14..fef6ebb 100644 --- a/API.cs +++ b/API.cs @@ -188,14 +188,36 @@ public static void APICalls(CurrentQuery query) getRoots.RunSynchronously(); Trace.WriteLine("Ran roots synchronously."); // JsonElement apiData = JSONResponse.RootElement.GetProperty("data"); - string rootInfo = JSONResponse.RootElement.GetProperty("data").ToString(); + string rootDataString = JSONResponse.RootElement.GetProperty("data").ToString(); Console.WriteLine(); // Etymology_summary - // + // (?<="etymology_summary":\s")(.*?)(?="},) + var etymologySummaryRegEx = new Regex("(?<=\"etymology_summary\":\\s\")(.*?)(?=\"},)"); + query.EtymologySummary = etymologySummaryRegEx.Match(rootDataString).ToString(); + Console.WriteLine("Where the word \"{0}\" came from:", query.UserEnteredWord); + Console.WriteLine(query.EtymologySummary); + Console.WriteLine(); + + // first_use - // + // (?<="first_use":\s")(.*?)(?=",) + var firstUseRegEx = new Regex("(?<=\"first_use\":\\s\")(.*?)(?=\",)"); + query.FirstUse = firstUseRegEx.Match(rootDataString).ToString(); + Console.WriteLine("First Recorded Use:"); + Console.WriteLine(query.FirstUse); + Console.WriteLine(); + + // Source Language // (?<="source_language":\s\[\["European languages",)(.*?)(?=\]) + var sourceLanguageRegEx = new Regex("(?<=\"source_language\":\\s\\[\\[\"European languages\",)(.*?)(?=\\])"); + query.SourceLanguage = sourceLanguageRegEx.Match(rootDataString).ToString(); + Console.WriteLine("The word \"{0}\" has origins in these European languages: ", query.UserEnteredWord); + Console.WriteLine(query.SourceLanguage); + Console.WriteLine("-----------"); + Console.WriteLine("Please Press Enter..."); + Console.ReadLine(); + } } diff --git a/CurrentQuery.cs b/CurrentQuery.cs index 384d2e5..429fb7e 100644 --- a/CurrentQuery.cs +++ b/CurrentQuery.cs @@ -18,6 +18,11 @@ class CurrentQuery : IDisposable public string Definition { get; set; } public string[] SenseIDs { get; set; } public string Lamma { get; set; } + + public string EtymologySummary { get; set; } + public string FirstUse { get; set; } + public string SourceLanguage { get; set; } + public Modes QueryMode { get; set; } public CurrentQuery() { diff --git a/bin/Debug/net5.0/OxfordV2.dll b/bin/Debug/net5.0/OxfordV2.dll index c74e26a..d9d95a2 100644 Binary files a/bin/Debug/net5.0/OxfordV2.dll and b/bin/Debug/net5.0/OxfordV2.dll differ diff --git a/bin/Debug/net5.0/OxfordV2.pdb b/bin/Debug/net5.0/OxfordV2.pdb index 673a718..f3f7413 100644 Binary files a/bin/Debug/net5.0/OxfordV2.pdb and b/bin/Debug/net5.0/OxfordV2.pdb differ diff --git a/bin/Debug/net5.0/ref/OxfordV2.dll b/bin/Debug/net5.0/ref/OxfordV2.dll index e1b96e5..bd03e8b 100644 Binary files a/bin/Debug/net5.0/ref/OxfordV2.dll and b/bin/Debug/net5.0/ref/OxfordV2.dll differ diff --git a/logs/Log_OxfordApplication_20210416-2043.txt b/logs/Log_OxfordApplication_20210416-2043.txt new file mode 100644 index 0000000..134b560 --- /dev/null +++ b/logs/Log_OxfordApplication_20210416-2043.txt @@ -0,0 +1,63 @@ +Leaving Main method. +Starting Main Menu +In MainMenu() +The user's input was read as: +d +Word look up selected +Found that QueryMode is set to words. +Looking up the word: +chair +Now to call the words endpoint. +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API +Called callWordsAPI +Making the request +Got responses. +Set JSONResponse to the response. +Left getWords task with the JSONResponse. +Parsing JSON +We now have the data as a string. +[{"id": "chair_nn01", "band": 6, "meta": {"created": 1889, "revised": false, "updated": null}, "lemma": "chair", "oed_url": "https://www.oed.com/view/Entry/30215#eid9765745", "daterange": {"end": null, "start": 1297, "obsolete": false, "rangestring": "1297\u2014"}, "etymology": {"etymons": [{"word": "cha\u00ebre", "language": "French"}, {"word": "chaiere", "language": "French"}], "etymology_type": "borrowingHybrid", "etymon_language": [["European languages", "Italic", "Romance", "Italo-Western", "Gallo-Romance", "French"]], "source_language": [["European languages", "Italic", "Romance", "Italo-Western", "Gallo-Romance", "French"], ["European languages", "Greek"]], "etymology_summary": "A borrowing from French, combined with an English element."}, "first_use": "Chronicle of Robert of Gloucester", "frequency": [[1750, 17], [1760, 19], [1770, 20], [1780, 20], [1790, 23], [1800, 24], [1810, 26], [1820, 29], [1830, 30], [1840, 33], [1850, 35], [1860, 38], [1870, 41], [1880, 43], [1890, 45], [1900, 47], [1910, 48], [1920, 47], [1930, 45], [1940, 41], [1950, 37], [1960, 33], [1970, 33], [1980, 38], [1990, 45], [2000, 49], [2010, 52]], "sense_ids": ["chair_nn01-9765748", "chair_nn01-9765918", "chair_nn01-9766034", "chair_nn01-9766086", "chair_nn01-9766128", "chair_nn01-9766167", "chair_nn01-9766191", "chair_nn01-9766261", "chair_nn01-9766309", "chair_nn01-9766353", "chair_nn01-9766415", "chair_nn01-9766435", "chair_nn01-9766456", "chair_nn01-9766508", "chair_nn01-9766538", "chair_nn01-9766562", "chair_nn01-9766607", "chair_nn01-9766670", "chair_nn01-9766761", "chair_nn01-9766784", "chair_nn01-9766861", "chair_nn01-9766921", "chair_nn01-9766962", "chair_nn01-9766979", "chair_nn01-128025765", "chair_nn01-218565101"], "definition": "A seat for one person (always implying more or less of comfort and ease); now the common name for the movable four-legged seat with a rest for the back, which constitutes, in many forms of rudeness or elegance, an ordinary article of household furniture, and is also used in gardens or wherever it is usual to sit. to take a chair: to take a seat, be seated.", "main_entry": true, "inflections": [{"region": "British", "inflections": [{"form": "chair", "part_of_speech": "NN"}, {"form": "chairs", "part_of_speech": "NNS"}]}, {"region": "US", "inflections": [{"form": "chair", "part_of_speech": "NN"}, {"form": "chairs", "part_of_speech": "NNS"}]}], "frequency_id": "chair_nn01-fq", "oed_reference": "chair, n.1", "pronunciations": [{"ipa": ["t\u0283\u025b\u02d0"], "region": "British"}, {"ipa": ["t\u0283\u025b(\u0259)r"], "region": "US"}], "parts_of_speech": ["NN"], "primary_sense_id": "chair_nn01-9765748"}] +Extracted definition. +Set definition to query object. +Now to get and set the word ID. +The wordID was grabbed as: +chair_nn01In MainMenu() +The user's input was read as: +r +Root selected. +Now to call the root endpoint. +Going to look up roots +API call URL is: +https://oed-researcher-api.oxfordlanguages.com/oed/api/v0.2/ +Making the request: +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API to get ROOTS. Bloody Roots!! +Called callRootsAPI +Making the request +System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[System.String,System.Net.Http.HttpClient+d__41] +Ran roots synchronously. +In MainMenu() +The user's input was read as: +x +Exit selected. diff --git a/logs/Log_OxfordApplication_20210416-2045.txt b/logs/Log_OxfordApplication_20210416-2045.txt new file mode 100644 index 0000000..134b560 --- /dev/null +++ b/logs/Log_OxfordApplication_20210416-2045.txt @@ -0,0 +1,63 @@ +Leaving Main method. +Starting Main Menu +In MainMenu() +The user's input was read as: +d +Word look up selected +Found that QueryMode is set to words. +Looking up the word: +chair +Now to call the words endpoint. +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API +Called callWordsAPI +Making the request +Got responses. +Set JSONResponse to the response. +Left getWords task with the JSONResponse. +Parsing JSON +We now have the data as a string. +[{"id": "chair_nn01", "band": 6, "meta": {"created": 1889, "revised": false, "updated": null}, "lemma": "chair", "oed_url": "https://www.oed.com/view/Entry/30215#eid9765745", "daterange": {"end": null, "start": 1297, "obsolete": false, "rangestring": "1297\u2014"}, "etymology": {"etymons": [{"word": "cha\u00ebre", "language": "French"}, {"word": "chaiere", "language": "French"}], "etymology_type": "borrowingHybrid", "etymon_language": [["European languages", "Italic", "Romance", "Italo-Western", "Gallo-Romance", "French"]], "source_language": [["European languages", "Italic", "Romance", "Italo-Western", "Gallo-Romance", "French"], ["European languages", "Greek"]], "etymology_summary": "A borrowing from French, combined with an English element."}, "first_use": "Chronicle of Robert of Gloucester", "frequency": [[1750, 17], [1760, 19], [1770, 20], [1780, 20], [1790, 23], [1800, 24], [1810, 26], [1820, 29], [1830, 30], [1840, 33], [1850, 35], [1860, 38], [1870, 41], [1880, 43], [1890, 45], [1900, 47], [1910, 48], [1920, 47], [1930, 45], [1940, 41], [1950, 37], [1960, 33], [1970, 33], [1980, 38], [1990, 45], [2000, 49], [2010, 52]], "sense_ids": ["chair_nn01-9765748", "chair_nn01-9765918", "chair_nn01-9766034", "chair_nn01-9766086", "chair_nn01-9766128", "chair_nn01-9766167", "chair_nn01-9766191", "chair_nn01-9766261", "chair_nn01-9766309", "chair_nn01-9766353", "chair_nn01-9766415", "chair_nn01-9766435", "chair_nn01-9766456", "chair_nn01-9766508", "chair_nn01-9766538", "chair_nn01-9766562", "chair_nn01-9766607", "chair_nn01-9766670", "chair_nn01-9766761", "chair_nn01-9766784", "chair_nn01-9766861", "chair_nn01-9766921", "chair_nn01-9766962", "chair_nn01-9766979", "chair_nn01-128025765", "chair_nn01-218565101"], "definition": "A seat for one person (always implying more or less of comfort and ease); now the common name for the movable four-legged seat with a rest for the back, which constitutes, in many forms of rudeness or elegance, an ordinary article of household furniture, and is also used in gardens or wherever it is usual to sit. to take a chair: to take a seat, be seated.", "main_entry": true, "inflections": [{"region": "British", "inflections": [{"form": "chair", "part_of_speech": "NN"}, {"form": "chairs", "part_of_speech": "NNS"}]}, {"region": "US", "inflections": [{"form": "chair", "part_of_speech": "NN"}, {"form": "chairs", "part_of_speech": "NNS"}]}], "frequency_id": "chair_nn01-fq", "oed_reference": "chair, n.1", "pronunciations": [{"ipa": ["t\u0283\u025b\u02d0"], "region": "British"}, {"ipa": ["t\u0283\u025b(\u0259)r"], "region": "US"}], "parts_of_speech": ["NN"], "primary_sense_id": "chair_nn01-9765748"}] +Extracted definition. +Set definition to query object. +Now to get and set the word ID. +The wordID was grabbed as: +chair_nn01In MainMenu() +The user's input was read as: +r +Root selected. +Now to call the root endpoint. +Going to look up roots +API call URL is: +https://oed-researcher-api.oxfordlanguages.com/oed/api/v0.2/ +Making the request: +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API to get ROOTS. Bloody Roots!! +Called callRootsAPI +Making the request +System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[System.String,System.Net.Http.HttpClient+d__41] +Ran roots synchronously. +In MainMenu() +The user's input was read as: +x +Exit selected. diff --git a/logs/Log_OxfordApplication_20210416-2046.txt b/logs/Log_OxfordApplication_20210416-2046.txt new file mode 100644 index 0000000..10aa8fa --- /dev/null +++ b/logs/Log_OxfordApplication_20210416-2046.txt @@ -0,0 +1,68 @@ +Leaving Main method. +Starting Main Menu +In MainMenu() +The user's input was read as: +r +Root selected. +Now to call the root endpoint. +In MainMenu() +The user's input was read as: +d +Word look up selected +Found that QueryMode is set to words. +Looking up the word: +chair +Now to call the words endpoint. +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API +Called callWordsAPI +Making the request +Got responses. +Set JSONResponse to the response. +Left getWords task with the JSONResponse. +Parsing JSON +We now have the data as a string. +[{"id": "chair_nn01", "band": 6, "meta": {"created": 1889, "revised": false, "updated": null}, "lemma": "chair", "oed_url": "https://www.oed.com/view/Entry/30215#eid9765745", "daterange": {"end": null, "start": 1297, "obsolete": false, "rangestring": "1297\u2014"}, "etymology": {"etymons": [{"word": "cha\u00ebre", "language": "French"}, {"word": "chaiere", "language": "French"}], "etymology_type": "borrowingHybrid", "etymon_language": [["European languages", "Italic", "Romance", "Italo-Western", "Gallo-Romance", "French"]], "source_language": [["European languages", "Italic", "Romance", "Italo-Western", "Gallo-Romance", "French"], ["European languages", "Greek"]], "etymology_summary": "A borrowing from French, combined with an English element."}, "first_use": "Chronicle of Robert of Gloucester", "frequency": [[1750, 17], [1760, 19], [1770, 20], [1780, 20], [1790, 23], [1800, 24], [1810, 26], [1820, 29], [1830, 30], [1840, 33], [1850, 35], [1860, 38], [1870, 41], [1880, 43], [1890, 45], [1900, 47], [1910, 48], [1920, 47], [1930, 45], [1940, 41], [1950, 37], [1960, 33], [1970, 33], [1980, 38], [1990, 45], [2000, 49], [2010, 52]], "sense_ids": ["chair_nn01-9765748", "chair_nn01-9765918", "chair_nn01-9766034", "chair_nn01-9766086", "chair_nn01-9766128", "chair_nn01-9766167", "chair_nn01-9766191", "chair_nn01-9766261", "chair_nn01-9766309", "chair_nn01-9766353", "chair_nn01-9766415", "chair_nn01-9766435", "chair_nn01-9766456", "chair_nn01-9766508", "chair_nn01-9766538", "chair_nn01-9766562", "chair_nn01-9766607", "chair_nn01-9766670", "chair_nn01-9766761", "chair_nn01-9766784", "chair_nn01-9766861", "chair_nn01-9766921", "chair_nn01-9766962", "chair_nn01-9766979", "chair_nn01-128025765", "chair_nn01-218565101"], "definition": "A seat for one person (always implying more or less of comfort and ease); now the common name for the movable four-legged seat with a rest for the back, which constitutes, in many forms of rudeness or elegance, an ordinary article of household furniture, and is also used in gardens or wherever it is usual to sit. to take a chair: to take a seat, be seated.", "main_entry": true, "inflections": [{"region": "British", "inflections": [{"form": "chair", "part_of_speech": "NN"}, {"form": "chairs", "part_of_speech": "NNS"}]}, {"region": "US", "inflections": [{"form": "chair", "part_of_speech": "NN"}, {"form": "chairs", "part_of_speech": "NNS"}]}], "frequency_id": "chair_nn01-fq", "oed_reference": "chair, n.1", "pronunciations": [{"ipa": ["t\u0283\u025b\u02d0"], "region": "British"}, {"ipa": ["t\u0283\u025b(\u0259)r"], "region": "US"}], "parts_of_speech": ["NN"], "primary_sense_id": "chair_nn01-9765748"}] +Extracted definition. +Set definition to query object. +Now to get and set the word ID. +The wordID was grabbed as: +chair_nn01In MainMenu() +The user's input was read as: +r +Root selected. +Now to call the root endpoint. +Going to look up roots +API call URL is: +https://oed-researcher-api.oxfordlanguages.com/oed/api/v0.2/ +Making the request: +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API to get ROOTS. Bloody Roots!! +Called callRootsAPI +Making the request +System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[System.String,System.Net.Http.HttpClient+d__41] +Ran roots synchronously. +In MainMenu() +The user's input was read as: +x +Exit selected. diff --git a/logs/Log_OxfordApplication_20210416-2047.txt b/logs/Log_OxfordApplication_20210416-2047.txt new file mode 100644 index 0000000..1cf37f0 --- /dev/null +++ b/logs/Log_OxfordApplication_20210416-2047.txt @@ -0,0 +1,136 @@ +Leaving Main method. +Starting Main Menu +In MainMenu() +The user's input was read as: +r +Root selected. +Now to call the root endpoint. +In MainMenu() +The user's input was read as: +d +Word look up selected +Found that QueryMode is set to words. +Looking up the word: +chair +Now to call the words endpoint. +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API +Called callWordsAPI +Making the request +Got responses. +Set JSONResponse to the response. +Left getWords task with the JSONResponse. +Parsing JSON +We now have the data as a string. +[{"id": "chair_nn01", "band": 6, "meta": {"created": 1889, "revised": false, "updated": null}, "lemma": "chair", "oed_url": "https://www.oed.com/view/Entry/30215#eid9765745", "daterange": {"end": null, "start": 1297, "obsolete": false, "rangestring": "1297\u2014"}, "etymology": {"etymons": [{"word": "cha\u00ebre", "language": "French"}, {"word": "chaiere", "language": "French"}], "etymology_type": "borrowingHybrid", "etymon_language": [["European languages", "Italic", "Romance", "Italo-Western", "Gallo-Romance", "French"]], "source_language": [["European languages", "Italic", "Romance", "Italo-Western", "Gallo-Romance", "French"], ["European languages", "Greek"]], "etymology_summary": "A borrowing from French, combined with an English element."}, "first_use": "Chronicle of Robert of Gloucester", "frequency": [[1750, 17], [1760, 19], [1770, 20], [1780, 20], [1790, 23], [1800, 24], [1810, 26], [1820, 29], [1830, 30], [1840, 33], [1850, 35], [1860, 38], [1870, 41], [1880, 43], [1890, 45], [1900, 47], [1910, 48], [1920, 47], [1930, 45], [1940, 41], [1950, 37], [1960, 33], [1970, 33], [1980, 38], [1990, 45], [2000, 49], [2010, 52]], "sense_ids": ["chair_nn01-9765748", "chair_nn01-9765918", "chair_nn01-9766034", "chair_nn01-9766086", "chair_nn01-9766128", "chair_nn01-9766167", "chair_nn01-9766191", "chair_nn01-9766261", "chair_nn01-9766309", "chair_nn01-9766353", "chair_nn01-9766415", "chair_nn01-9766435", "chair_nn01-9766456", "chair_nn01-9766508", "chair_nn01-9766538", "chair_nn01-9766562", "chair_nn01-9766607", "chair_nn01-9766670", "chair_nn01-9766761", "chair_nn01-9766784", "chair_nn01-9766861", "chair_nn01-9766921", "chair_nn01-9766962", "chair_nn01-9766979", "chair_nn01-128025765", "chair_nn01-218565101"], "definition": "A seat for one person (always implying more or less of comfort and ease); now the common name for the movable four-legged seat with a rest for the back, which constitutes, in many forms of rudeness or elegance, an ordinary article of household furniture, and is also used in gardens or wherever it is usual to sit. to take a chair: to take a seat, be seated.", "main_entry": true, "inflections": [{"region": "British", "inflections": [{"form": "chair", "part_of_speech": "NN"}, {"form": "chairs", "part_of_speech": "NNS"}]}, {"region": "US", "inflections": [{"form": "chair", "part_of_speech": "NN"}, {"form": "chairs", "part_of_speech": "NNS"}]}], "frequency_id": "chair_nn01-fq", "oed_reference": "chair, n.1", "pronunciations": [{"ipa": ["t\u0283\u025b\u02d0"], "region": "British"}, {"ipa": ["t\u0283\u025b(\u0259)r"], "region": "US"}], "parts_of_speech": ["NN"], "primary_sense_id": "chair_nn01-9765748"}] +Extracted definition. +Set definition to query object. +Now to get and set the word ID. +The wordID was grabbed as: +chair_nn01In MainMenu() +The user's input was read as: +r +Root selected. +Now to call the root endpoint. +Going to look up roots +API call URL is: +https://oed-researcher-api.oxfordlanguages.com/oed/api/v0.2/ +Making the request: +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API to get ROOTS. Bloody Roots!! +Called callRootsAPI +Making the request +System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[System.String,System.Net.Http.HttpClient+d__41] +Ran roots synchronously. +In MainMenu() +The user's input was read as: +n +New word +query.HasLookedUpWord +False +query.Definition + +In MainMenu() +The user's input was read as: +d +Word look up selected +Found that QueryMode is set to words. +Looking up the word: +chair +Now to call the words endpoint. +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API +Called callWordsAPI +Making the request +Got responses. +Set JSONResponse to the response. +Left getWords task with the JSONResponse. +Parsing JSON +We now have the data as a string. +[{"id": "chair_nn01", "band": 6, "meta": {"created": 1889, "revised": false, "updated": null}, "lemma": "chair", "oed_url": "https://www.oed.com/view/Entry/30215#eid9765745", "daterange": {"end": null, "start": 1297, "obsolete": false, "rangestring": "1297\u2014"}, "etymology": {"etymons": [{"word": "cha\u00ebre", "language": "French"}, {"word": "chaiere", "language": "French"}], "etymology_type": "borrowingHybrid", "etymon_language": [["European languages", "Italic", "Romance", "Italo-Western", "Gallo-Romance", "French"]], "source_language": [["European languages", "Italic", "Romance", "Italo-Western", "Gallo-Romance", "French"], ["European languages", "Greek"]], "etymology_summary": "A borrowing from French, combined with an English element."}, "first_use": "Chronicle of Robert of Gloucester", "frequency": [[1750, 17], [1760, 19], [1770, 20], [1780, 20], [1790, 23], [1800, 24], [1810, 26], [1820, 29], [1830, 30], [1840, 33], [1850, 35], [1860, 38], [1870, 41], [1880, 43], [1890, 45], [1900, 47], [1910, 48], [1920, 47], [1930, 45], [1940, 41], [1950, 37], [1960, 33], [1970, 33], [1980, 38], [1990, 45], [2000, 49], [2010, 52]], "sense_ids": ["chair_nn01-9765748", "chair_nn01-9765918", "chair_nn01-9766034", "chair_nn01-9766086", "chair_nn01-9766128", "chair_nn01-9766167", "chair_nn01-9766191", "chair_nn01-9766261", "chair_nn01-9766309", "chair_nn01-9766353", "chair_nn01-9766415", "chair_nn01-9766435", "chair_nn01-9766456", "chair_nn01-9766508", "chair_nn01-9766538", "chair_nn01-9766562", "chair_nn01-9766607", "chair_nn01-9766670", "chair_nn01-9766761", "chair_nn01-9766784", "chair_nn01-9766861", "chair_nn01-9766921", "chair_nn01-9766962", "chair_nn01-9766979", "chair_nn01-128025765", "chair_nn01-218565101"], "definition": "A seat for one person (always implying more or less of comfort and ease); now the common name for the movable four-legged seat with a rest for the back, which constitutes, in many forms of rudeness or elegance, an ordinary article of household furniture, and is also used in gardens or wherever it is usual to sit. to take a chair: to take a seat, be seated.", "main_entry": true, "inflections": [{"region": "British", "inflections": [{"form": "chair", "part_of_speech": "NN"}, {"form": "chairs", "part_of_speech": "NNS"}]}, {"region": "US", "inflections": [{"form": "chair", "part_of_speech": "NN"}, {"form": "chairs", "part_of_speech": "NNS"}]}], "frequency_id": "chair_nn01-fq", "oed_reference": "chair, n.1", "pronunciations": [{"ipa": ["t\u0283\u025b\u02d0"], "region": "British"}, {"ipa": ["t\u0283\u025b(\u0259)r"], "region": "US"}], "parts_of_speech": ["NN"], "primary_sense_id": "chair_nn01-9765748"}] +Extracted definition. +Set definition to query object. +Now to get and set the word ID. +The wordID was grabbed as: +chair_nn01In MainMenu() +The user's input was read as: +r +Root selected. +Now to call the root endpoint. +Going to look up roots +API call URL is: +https://oed-researcher-api.oxfordlanguages.com/oed/api/v0.2/ +Making the request: +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API to get ROOTS. Bloody Roots!! +Called callRootsAPI +Making the request +System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[System.String,System.Net.Http.HttpClient+d__41] +Ran roots synchronously. +In MainMenu() +The user's input was read as: + +In MainMenu() +The user's input was read as: +x +Exit selected. diff --git a/logs/Log_OxfordApplication_20210416-2051.txt b/logs/Log_OxfordApplication_20210416-2051.txt new file mode 100644 index 0000000..434fa0d --- /dev/null +++ b/logs/Log_OxfordApplication_20210416-2051.txt @@ -0,0 +1,66 @@ +Leaving Main method. +Starting Main Menu +In MainMenu() +The user's input was read as: +d +Word look up selected +Found that QueryMode is set to words. +Looking up the word: +computer +Now to call the words endpoint. +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API +Called callWordsAPI +Making the request +Got responses. +Set JSONResponse to the response. +Left getWords task with the JSONResponse. +Parsing JSON +We now have the data as a string. +[{"id": "computer_nn01", "band": 9, "meta": {"created": 1891, "revised": true, "updated": 2008}, "lemma": "computer", "oed_url": "https://www.oed.com/view/Entry/37975#eid8618136", "daterange": {"end": null, "start": 1613, "obsolete": false, "rangestring": "1613\u2014"}, "etymology": {"etymons": [{"word": "compute", "language": "English", "target_id": "compute_vb01", "part_of_speech": "VB"}, {"word": "-er", "language": "English", "target_id": "er_su01", "part_of_speech": "SUFFIX"}], "etymology_type": "derivative", "etymon_language": [["English"]], "source_language": [["European languages", "Italic", "Latin"]], "etymology_summary": "Formed within English, by derivation."}, "first_use": "\u2018R. B.\u2019", "frequency": [[1750, 0.21], [1760, 0.18], [1770, 0.17], [1780, 0.16], [1790, 0.15], [1800, 0.14], [1810, 0.083], [1820, 0.077], [1830, 0.086], [1840, 0.086], [1850, 0.093], [1860, 0.11], [1870, 0.13], [1880, 0.16], [1890, 0.18], [1900, 0.21], [1910, 0.24], [1920, 0.45], [1930, 2.1], [1940, 10], [1950, 17], [1960, 40], [1970, 77], [1980, 110], [1990, 120], [2000, 120], [2010, 120]], "sense_ids": ["computer_nn01-8618138", "computer_nn01-8618177", "computer_nn01-130514973", "computer_nn01-130514976"], "definition": "An electronic device (or system of devices) which is used to store, manipulate, and communicate information, perform complex calculations, or control or regulate other devices or machines, and is capable of receiving information (data) and of processing it in accordance with variable procedural instructions (programs or software); esp. a small, self-contained one for individual use in the home or workplace, used esp. for handling text, images, music, and video, accessing and using the internet\u2026", "main_entry": true, "inflections": [{"region": "British", "inflections": [{"form": "computer", "part_of_speech": "NN"}, {"form": "computers", "part_of_speech": "NNS"}]}, {"region": "US", "inflections": [{"form": "computer", "part_of_speech": "NN"}, {"form": "computers", "part_of_speech": "NNS"}]}], "frequency_id": "computer_nn01-fq", "oed_reference": "computer, n.", "pronunciations": [{"ipa": ["k\u0259m\u02c8pju\u02d0t\u0259"], "region": "British"}, {"ipa": ["k\u0259m\u02c8pjud\u0259r"], "region": "US"}], "parts_of_speech": ["NN"], "primary_sense_id": "computer_nn01-130514973"}] +Extracted definition. +Set definition to query object. +Now to get and set the word ID. +The wordID was grabbed as: +computer_nn01In MainMenu() +The user's input was read as: +r +Root selected. +Now to call the root endpoint. +Going to look up roots +API call URL is: +https://oed-researcher-api.oxfordlanguages.com/oed/api/v0.2/ +Making the request: +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API to get ROOTS. Bloody Roots!! +Called callRootsAPI +Making the request +System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[System.String,System.Net.Http.HttpClient+d__41] +Ran roots synchronously. +In MainMenu() +The user's input was read as: + +In MainMenu() +The user's input was read as: +x +Exit selected. diff --git a/logs/Log_OxfordApplication_20210416-2052.txt b/logs/Log_OxfordApplication_20210416-2052.txt new file mode 100644 index 0000000..be28227 --- /dev/null +++ b/logs/Log_OxfordApplication_20210416-2052.txt @@ -0,0 +1,63 @@ +Leaving Main method. +Starting Main Menu +In MainMenu() +The user's input was read as: +d +Word look up selected +Found that QueryMode is set to words. +Looking up the word: +computer +Now to call the words endpoint. +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API +Called callWordsAPI +Making the request +Got responses. +Set JSONResponse to the response. +Left getWords task with the JSONResponse. +Parsing JSON +We now have the data as a string. +[{"id": "computer_nn01", "band": 9, "meta": {"created": 1891, "revised": true, "updated": 2008}, "lemma": "computer", "oed_url": "https://www.oed.com/view/Entry/37975#eid8618136", "daterange": {"end": null, "start": 1613, "obsolete": false, "rangestring": "1613\u2014"}, "etymology": {"etymons": [{"word": "compute", "language": "English", "target_id": "compute_vb01", "part_of_speech": "VB"}, {"word": "-er", "language": "English", "target_id": "er_su01", "part_of_speech": "SUFFIX"}], "etymology_type": "derivative", "etymon_language": [["English"]], "source_language": [["European languages", "Italic", "Latin"]], "etymology_summary": "Formed within English, by derivation."}, "first_use": "\u2018R. B.\u2019", "frequency": [[1750, 0.21], [1760, 0.18], [1770, 0.17], [1780, 0.16], [1790, 0.15], [1800, 0.14], [1810, 0.083], [1820, 0.077], [1830, 0.086], [1840, 0.086], [1850, 0.093], [1860, 0.11], [1870, 0.13], [1880, 0.16], [1890, 0.18], [1900, 0.21], [1910, 0.24], [1920, 0.45], [1930, 2.1], [1940, 10], [1950, 17], [1960, 40], [1970, 77], [1980, 110], [1990, 120], [2000, 120], [2010, 120]], "sense_ids": ["computer_nn01-8618138", "computer_nn01-8618177", "computer_nn01-130514973", "computer_nn01-130514976"], "definition": "An electronic device (or system of devices) which is used to store, manipulate, and communicate information, perform complex calculations, or control or regulate other devices or machines, and is capable of receiving information (data) and of processing it in accordance with variable procedural instructions (programs or software); esp. a small, self-contained one for individual use in the home or workplace, used esp. for handling text, images, music, and video, accessing and using the internet\u2026", "main_entry": true, "inflections": [{"region": "British", "inflections": [{"form": "computer", "part_of_speech": "NN"}, {"form": "computers", "part_of_speech": "NNS"}]}, {"region": "US", "inflections": [{"form": "computer", "part_of_speech": "NN"}, {"form": "computers", "part_of_speech": "NNS"}]}], "frequency_id": "computer_nn01-fq", "oed_reference": "computer, n.", "pronunciations": [{"ipa": ["k\u0259m\u02c8pju\u02d0t\u0259"], "region": "British"}, {"ipa": ["k\u0259m\u02c8pjud\u0259r"], "region": "US"}], "parts_of_speech": ["NN"], "primary_sense_id": "computer_nn01-130514973"}] +Extracted definition. +Set definition to query object. +Now to get and set the word ID. +The wordID was grabbed as: +computer_nn01In MainMenu() +The user's input was read as: +r +Root selected. +Now to call the root endpoint. +Going to look up roots +API call URL is: +https://oed-researcher-api.oxfordlanguages.com/oed/api/v0.2/ +Making the request: +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API to get ROOTS. Bloody Roots!! +Called callRootsAPI +Making the request +System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[System.String,System.Net.Http.HttpClient+d__41] +Ran roots synchronously. +In MainMenu() +The user's input was read as: +x +Exit selected. diff --git a/logs/Log_OxfordApplication_20210416-2054.txt b/logs/Log_OxfordApplication_20210416-2054.txt new file mode 100644 index 0000000..0cbf9a9 --- /dev/null +++ b/logs/Log_OxfordApplication_20210416-2054.txt @@ -0,0 +1,63 @@ +Leaving Main method. +Starting Main Menu +In MainMenu() +The user's input was read as: +d +Word look up selected +Found that QueryMode is set to words. +Looking up the word: +penis +Now to call the words endpoint. +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API +Called callWordsAPI +Making the request +Got responses. +Set JSONResponse to the response. +Left getWords task with the JSONResponse. +Parsing JSON +We now have the data as a string. +[{"id": "penis_nn01", "band": 11, "meta": {"created": 1904, "revised": true, "updated": 2005}, "lemma": "penis", "oed_url": "https://www.oed.com/view/Entry/140136#eid31070718", "daterange": {"end": null, "start": 1578, "obsolete": false, "rangestring": "1578\u2014"}, "etymology": {"etymons": [{"word": "p\u0113nis", "language": "Latin"}], "etymology_type": "borrowing", "etymon_language": [["European languages", "Italic", "Latin"]], "source_language": [["European languages", "Italic", "Latin"]], "etymology_summary": "A borrowing from Latin."}, "first_use": "John Banister", "frequency": [[1750, 3.1], [1760, 3.1], [1770, 2.9], [1780, 2.9], [1790, 3.0], [1800, 2.9], [1810, 2.7], [1820, 2.4], [1830, 2.3], [1840, 2.5], [1850, 2.7], [1860, 2.8], [1870, 3.0], [1880, 3.1], [1890, 3.0], [1900, 3.0], [1910, 2.8], [1920, 2.9], [1930, 3.0], [1940, 3.1], [1950, 3.7], [1960, 4.3], [1970, 4.8], [1980, 5.7], [1990, 5.8], [2000, 5.8], [2010, 5.6]], "sense_ids": ["penis_nn01-31070720"], "definition": "Anatomy and Zoology. The male genital organ used (usually) for copulation and for the emission or dispersal of sperm, in mammals containing erectile tissue and serving also for the elimination of urine.", "main_entry": true, "inflections": [{"region": "British", "inflections": [{"form": "penis", "part_of_speech": "NN"}, {"form": "penes", "part_of_speech": "NNS"}, {"form": "penises", "part_of_speech": "NNS"}]}, {"region": "US", "inflections": [{"form": "penis", "part_of_speech": "NN"}, {"form": "penes", "part_of_speech": "NNS"}, {"form": "penises", "part_of_speech": "NNS"}]}], "frequency_id": "penis_nn01-fq", "oed_reference": "penis, n.", "pronunciations": [{"ipa": ["\u02c8pi\u02d0n\u026as"], "region": "British"}, {"ipa": ["\u02c8pin\u1d7bs"], "region": "US"}], "parts_of_speech": ["NN"], "primary_sense_id": "penis_nn01-31070720"}] +Extracted definition. +Set definition to query object. +Now to get and set the word ID. +The wordID was grabbed as: +penis_nn01In MainMenu() +The user's input was read as: +r +Root selected. +Now to call the root endpoint. +Going to look up roots +API call URL is: +https://oed-researcher-api.oxfordlanguages.com/oed/api/v0.2/ +Making the request: +Getting request keys +resetHeaders called. +App Id is: +4ebc819b +Key is: +b6b1ca0e4e766b222d56c20f43c2396f +Here are the request Headers... +Accept: application/json +app_id: 4ebc819b +app_key: b6b1ca0e4e766b222d56c20f43c2396f + +Calling the API to get ROOTS. Bloody Roots!! +Called callRootsAPI +Making the request +System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[System.String,System.Net.Http.HttpClient+d__41] +Ran roots synchronously. +In MainMenu() +The user's input was read as: +x +Exit selected. diff --git a/obj/Debug/net5.0/OxfordV2.dll b/obj/Debug/net5.0/OxfordV2.dll index c74e26a..d9d95a2 100644 Binary files a/obj/Debug/net5.0/OxfordV2.dll and b/obj/Debug/net5.0/OxfordV2.dll differ diff --git a/obj/Debug/net5.0/OxfordV2.pdb b/obj/Debug/net5.0/OxfordV2.pdb index 673a718..f3f7413 100644 Binary files a/obj/Debug/net5.0/OxfordV2.pdb and b/obj/Debug/net5.0/OxfordV2.pdb differ diff --git a/obj/Debug/net5.0/ref/OxfordV2.dll b/obj/Debug/net5.0/ref/OxfordV2.dll index e1b96e5..bd03e8b 100644 Binary files a/obj/Debug/net5.0/ref/OxfordV2.dll and b/obj/Debug/net5.0/ref/OxfordV2.dll differ