Skip to content

Commit

Permalink
senses work - publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
lavedon committed May 6, 2021
1 parent 7ae4bc7 commit e898383
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion API.cs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ public static void APICalls(CurrentQuery query)

Console.WriteLine("---- S to Save - X to exit - Enter for more----");
string input = Console.ReadLine().Trim().ToLower();
if (input == "S")
if (input == "s")
{
SavedQueries.AddMember(currentSense);
}
Expand Down
28 changes: 23 additions & 5 deletions OED-export.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<SuperMemoCollection>
<Count>2</Count>
<Count>4</Count>
<SuperMemoElement>
<ID>1</ID>
<Title>H. Purcell - 1683</Title>
<Title> - 1856</Title>
<Type>Topic</Type>
<Content>
<Question>The English Practitioner..will find a few terms of Art perhaps unusual to him, the chief of which are..Piano. --H. Purcell, 1683</Question>
<Question>If this is an index of what is going on in Ohio, look out for a landslide here on the 6th of November, for we are all going one way. --, 1856</Question>
<SuperMemoReference>&amp;lt;H5 dir=ltr align=left&amp;gt;&amp;lt;Font size=&amp;quot;1&amp;quot; style=&amp;quot;color: transparent&amp;quot;&amp;gt; SuperMemo Reference:&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;FONT class=reference&amp;gt;Title:&amp;quot;My Test Quote&amp;quot; &amp;lt;br&amp;gt;Source: Oxford English Dictionary</SuperMemoReference>
</Content>
</SuperMemoElement>
<SuperMemoElement>
<ID>2</ID>
<Title> - 1724</Title>
<Title>H. B. Stowe - 1868</Title>
<Type>Topic</Type>
<Content>
<Question>Piano, or the Letter P, signifies Soft or Low. --, 1724</Question>
<Question>His first great speech..was a perfect land-slide of history of argument; an avalanche under which the opposing party were logically buried. --H. B. Stowe, 1868</Question>
<SuperMemoReference>&amp;lt;H5 dir=ltr align=left&amp;gt;&amp;lt;Font size=&amp;quot;1&amp;quot; style=&amp;quot;color: transparent&amp;quot;&amp;gt; SuperMemo Reference:&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;FONT class=reference&amp;gt;Title:&amp;quot;My Test Quote&amp;quot; &amp;lt;br&amp;gt;Source: Oxford English Dictionary</SuperMemoReference>
</Content>
</SuperMemoElement>
<SuperMemoElement>
<ID>1</ID>
<Title>An overwhelming majority of votes for one party or candidate in an election; a victory achieved with such a majority.</Title>
<Type>Topic</Type>
<Content>
<Question>An overwhelming majority of votes for one party or candidate in an election; a victory achieved with such a majority. --This sense was first used in the year 1856, This usage is NOT obsolete., This sense is NOT the main sense for this word., landslide, n., sense 2</Question>
<SuperMemoReference>&amp;lt;H5 dir=ltr align=left&amp;gt;&amp;lt;Font size=&amp;quot;1&amp;quot; style=&amp;quot;color: transparent&amp;quot;&amp;gt; SuperMemo Reference:&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;FONT class=reference&amp;gt;Title:&amp;quot;My Test Quote&amp;quot; &amp;lt;br&amp;gt;Source: Oxford English Dictionary</SuperMemoReference>
</Content>
</SuperMemoElement>
<SuperMemoElement>
<ID>2</ID>
<Title>An overwhelming majority of votes for one party or candidate in an election; a victory achieved with such a majority.</Title>
<Type>Topic</Type>
<Content>
<Question>An overwhelming majority of votes for one party or candidate in an election; a victory achieved with such a majority. --This sense was first used in the year 1856, This usage is NOT obsolete., This sense is NOT the main sense for this word., landslide, n., sense 2</Question>
<SuperMemoReference>&amp;lt;H5 dir=ltr align=left&amp;gt;&amp;lt;Font size=&amp;quot;1&amp;quot; style=&amp;quot;color: transparent&amp;quot;&amp;gt; SuperMemo Reference:&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;FONT class=reference&amp;gt;Title:&amp;quot;My Test Quote&amp;quot; &amp;lt;br&amp;gt;Source: Oxford English Dictionary</SuperMemoReference>
</Content>
</SuperMemoElement>
Expand Down
4 changes: 2 additions & 2 deletions SavedQueries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static void RenderXML() {
xml.WriteElementString("Title", $"{Quotes[i].Author} - {Quotes[i].Year}");
xml.WriteElementString("Type", "Topic");
xml.WriteStartElement("Content");
xml.WriteElementString("Question", $"{Quotes[i].Text} --{Quotes[i].Author}, {Quotes[i].Year}");
xml.WriteElementString("Question", $"\"{Quotes[i].Text}\" --{Quotes[i].Author}, {Quotes[i].Year}");

string encoded = WebUtility.HtmlEncode("<H5 dir=ltr align=left><Font size=\"1\" style=\"color: transparent\"> SuperMemo Reference:</font><br><FONT class=reference>Title:\"My Test Quote\" <br>Source: Oxford English Dictionary");
xml.WriteElementString("SuperMemoReference", encoded);
Expand Down Expand Up @@ -118,7 +118,7 @@ public static void RenderXML() {
xml.WriteElementString("Title", $"{Senses[i].Definition}");
xml.WriteElementString("Type", "Topic");
xml.WriteStartElement("Content");
xml.WriteElementString("Question", $"{Senses[i].Definition} --This sense was first used in the year {Senses[i].Start}, {obsoleteText}, {mainUsageText}, {Senses[i].OedReference}");
xml.WriteElementString("Question", $"Sense: \"{Senses[i].Definition}\" --This sense was first used in the year {Senses[i].Start}, {obsoleteText}, {mainUsageText}, {Senses[i].OedReference}");

string encoded = WebUtility.HtmlEncode("<H5 dir=ltr align=left><Font size=\"1\" style=\"color: transparent\"> SuperMemo Reference:</font><br><FONT class=reference>Title:\"My Test Quote\" <br>Source: Oxford English Dictionary");
xml.WriteElementString("SuperMemoReference", encoded);
Expand Down
Binary file modified bin/Debug/net5.0/OxfordV2.dll
Binary file not shown.
Binary file modified bin/Debug/net5.0/OxfordV2.pdb
Binary file not shown.
Binary file modified obj/Debug/net5.0/OxfordV2.dll
Binary file not shown.
Binary file modified obj/Debug/net5.0/OxfordV2.pdb
Binary file not shown.
Binary file modified test-collection-for-import/info/ElementInfo.dat
Binary file not shown.
Binary file modified test-collection-for-import/info/compon.dat
Binary file not shown.
Binary file modified test-collection-for-import/info/contents.dat
Binary file not shown.
Binary file modified test-collection-for-import/info/history.sub
Binary file not shown.
Binary file modified test-collection-for-import/registry/Text.lst
Binary file not shown.
Binary file modified test-collection-for-import/registry/Text.mem
Binary file not shown.
Binary file modified test-collection-for-import/registry/Text.ptr
Binary file not shown.
Binary file modified test-collection-for-import/registry/Text.rtx
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
SuperMemo Report
Activity: Importing from C:\my-coding-projects\oxford\OED-export.xml
Collection: c:\my-coding-projects\oxford\test-collection-for-import
Date: Wednesday, May 5, 2021, 9:57:03 PM
Date: Wednesday, May 5, 2021, 10:11:08 PM
SuperMemo 18 (Build 18.04, Mar 6, 2020)


Process completed at 9:57:03 PM in 00:00:00 sec (Wednesday, May 5, 2021)
Process completed at 10:11:08 PM in 00:00:00 sec (Wednesday, May 5, 2021)

NO ERRORS (Importing from C:\my-coding-projects\oxford\OED-export.xml)

Expand Down

0 comments on commit e898383

Please sign in to comment.