diff --git a/.gitignore b/.gitignore
index b0d478eb..7699820d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -136,7 +136,7 @@ publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
-# TODO: Comment the next line if you want to checkin your web deploy settings
+# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
@@ -211,3 +211,6 @@ TestResults/
build.txt
build.bat
test.bat
+
+tasks.json
+launch.json
diff --git a/.travis.yml b/.travis.yml
index e3a6a409..9a481752 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,11 +1,18 @@
language: csharp
+sudo: required
+
+env:
+ - CLI_VERSION=latest
+
+dotnet: 2.0.0
install:
- nuget restore rosette_api.sln
+ - msbuild /t:restore
script:
- - xbuild /p:Configuration=Release rosette_api.sln
- - mono ./packages/NUnit.Console.3.0.1/tools/nunit3-console.exe ./rosette_apiUnitTests/bin/Release/rosette_apiUnitTests.dll
+ - msbuild /p:Configuration=Release rosette_api.sln
+ - dotnet test ./rosette_api.tests/rosette_api.tests.csproj
notifications:
slack:
diff --git a/rosette_api.sln b/rosette_api.sln
index 5a508d5a..d2105a34 100644
--- a/rosette_api.sln
+++ b/rosette_api.sln
@@ -1,18 +1,11 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.31101.0
+# Visual Studio 15
+VisualStudioVersion = 15.0.27004.2006
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "rosette_api", "rosette_api\rosette_api.csproj", "{D719A8A7-C5C7-49CF-BFFC-523D605E5E37}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "rosette_api", "rosette_api\rosette_api.csproj", "{F58E73CD-A7F7-4A5E-980D-EEDAAD30C82C}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "rosette_apiUnitTests", "rosette_apiUnitTests\rosette_apiUnitTests.csproj", "{10EAD22C-041F-4436-A391-935897309C23}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{F17AACDD-48B8-43EA-BF0C-0129592B2BC9}"
- ProjectSection(SolutionItems) = preProject
- .nuget\packages.config = .nuget\packages.config
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2F9FBE70-5FE8-4A79-96B1-E504266A3CE1}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "rosette_api.tests", "rosette_api.tests\rosette_api.tests.csproj", "{CF12E1B2-D53A-46E1-AEB7-BF499D54C4CB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -20,16 +13,19 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D719A8A7-C5C7-49CF-BFFC-523D605E5E37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D719A8A7-C5C7-49CF-BFFC-523D605E5E37}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D719A8A7-C5C7-49CF-BFFC-523D605E5E37}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D719A8A7-C5C7-49CF-BFFC-523D605E5E37}.Release|Any CPU.Build.0 = Release|Any CPU
- {10EAD22C-041F-4436-A391-935897309C23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {10EAD22C-041F-4436-A391-935897309C23}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {10EAD22C-041F-4436-A391-935897309C23}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {10EAD22C-041F-4436-A391-935897309C23}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F58E73CD-A7F7-4A5E-980D-EEDAAD30C82C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F58E73CD-A7F7-4A5E-980D-EEDAAD30C82C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F58E73CD-A7F7-4A5E-980D-EEDAAD30C82C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F58E73CD-A7F7-4A5E-980D-EEDAAD30C82C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CF12E1B2-D53A-46E1-AEB7-BF499D54C4CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CF12E1B2-D53A-46E1-AEB7-BF499D54C4CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CF12E1B2-D53A-46E1-AEB7-BF499D54C4CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CF12E1B2-D53A-46E1-AEB7-BF499D54C4CB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {68CFC07C-B64A-44AB-93A5-E1C33C0792FC}
+ EndGlobalSection
EndGlobal
diff --git a/rosette_api.tests/rosette_api.tests.csproj b/rosette_api.tests/rosette_api.tests.csproj
new file mode 100755
index 00000000..4d35e72f
--- /dev/null
+++ b/rosette_api.tests/rosette_api.tests.csproj
@@ -0,0 +1,18 @@
+
+
+
+ netcoreapp2.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/rosette_apiUnitTests/rosette_apiUnitTests.cs b/rosette_api.tests/rosette_apiUnitTests.cs
similarity index 96%
rename from rosette_apiUnitTests/rosette_apiUnitTests.cs
rename to rosette_api.tests/rosette_apiUnitTests.cs
index d0d46532..12e0e2ed 100755
--- a/rosette_apiUnitTests/rosette_apiUnitTests.cs
+++ b/rosette_api.tests/rosette_apiUnitTests.cs
@@ -9,7 +9,6 @@
using System.Linq;
using System.Net;
using System.Net.Http;
-using System.Web.Script.Serialization;
using Newtonsoft.Json;
using System.Threading.Tasks;
@@ -470,8 +469,8 @@ public void InfoTestFull()
{ "buildNumber", buildNumber },
{ "buildTime", buildTime }
};
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
- HttpResponseMessage mockedMessage = MakeMockedMessage(responseHeaders, HttpStatusCode.OK, new JavaScriptSerializer().Serialize(content));
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
+ HttpResponseMessage mockedMessage = MakeMockedMessage(responseHeaders, HttpStatusCode.OK, JsonConvert.SerializeObject(content));
_mockHttp.When(_testUrl + "info").Respond(req => mockedMessage);
InfoResponse expected = new InfoResponse(name, version, buildNumber, buildTime, responseHeaders, content);
InfoResponse response = _rosetteApi.Info();
@@ -521,8 +520,8 @@ public void PingTestFull() {
{ "message", message },
{ "time", time }
};
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
- HttpResponseMessage mockedMessage = MakeMockedMessage(responseHeaders, HttpStatusCode.OK, new JavaScriptSerializer().Serialize(content));
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
+ HttpResponseMessage mockedMessage = MakeMockedMessage(responseHeaders, HttpStatusCode.OK, JsonConvert.SerializeObject(content));
_mockHttp.When(_testUrl + "ping").Respond(req => mockedMessage);
PingResponse expected = new PingResponse(message, time, responseHeaders, content);
PingResponse response = _rosetteApi.Ping();
@@ -644,7 +643,7 @@ public void EntityTestFull()
RosetteEntity e1 = new RosetteEntity("The Hollywood Reporter", "The Hollywood Reporter", new EntityID("Q61503"), "ORGANIZATION", 1, null);
List entities = new List() { e0, e1 };
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
Dictionary content = new Dictionary {
{ "entities", entities }
};
@@ -731,7 +730,7 @@ public void LanguageTestFull()
LanguageDetection lang8 = new LanguageDetection("fra", (decimal)0.023298946617300347);
List languageDetections = new List() { lang0, lang1, lang2, lang3, lang4, lang5, lang6, lang7, lang8 };
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
Dictionary content = new Dictionary {
{ "languageDetections", languageDetections }
};
@@ -790,7 +789,7 @@ public void MorphologyTestFullComplete()
MorphologyItem m5 = new MorphologyItem(".", "PUNCT", ".", new List(), new List());
List morphology = new List() { m0, m1, m2, m3, m4, m5 };
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
Dictionary content = new Dictionary {
{ "tokens", new List(morphology.Select((item) => item.Token)) },
{ "posTags", new List(morphology.Select((item) => item.PosTag)) },
@@ -818,7 +817,7 @@ public void MorphologyTestFullLemmas()
MorphologyItem m5 = new MorphologyItem(".", null, ".", null, null);
List morphology = new List() { m0, m1, m2, m3, m4, m5 };
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
Dictionary content = new Dictionary {
{ "tokens", new List(morphology.Select((item) => item.Token)) }
};
@@ -841,7 +840,7 @@ public void MorphologyTestFullCompoundComponents()
MorphologyItem m1 = new MorphologyItem("Rechtsschutzversicherungsgesellschaft", null, null, compoundComponents, null);
List morphology = new List() { m0, m1 };
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
Dictionary content = new Dictionary {
{ "tokens", new List(morphology.Select((item) => item.Token)) }
};
@@ -867,7 +866,7 @@ public void MorphologyTestFullHanReadings()
MorphologyItem m2 = new MorphologyItem("主任", null, null, null, h2);
List morphology = new List() { m0, m1, m2 };
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
Dictionary content = new Dictionary {
{ "tokens", new List(morphology.Select((item) => item.Token)) }
};
@@ -922,7 +921,7 @@ public void NameSimilarityTestFull()
Init();
double score = (double)0.9486632809417912;
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
Dictionary content = new Dictionary {
{ "score", score }
};
@@ -1042,7 +1041,7 @@ public void RelationshipsTestFull()
List locatives = new List() {loc1};
HashSet modalities = new HashSet() {"assertion", "someOtherModality"};
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
List relationships = new List() {
new RosetteRelationship(predicate, new Dictionary() {{1, arg1}}, new Dictionary() {{1, arg1ID}}, null, locatives, null, confidence, modalities)
};
@@ -1068,7 +1067,7 @@ public void RelationshipsTestFullNoArgID()
List locatives = new List() { loc1 };
HashSet modalities = new HashSet() { "assertion", "someOtherModality" };
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
List relationships = new List() {
new RosetteRelationship(predicate, new Dictionary() {{1, arg1}}, new Dictionary(), null, locatives, null, confidence, modalities)
};
@@ -1140,7 +1139,7 @@ public void TextEmbeddingTestFull()
Init();
List vector = new List() {0.02164695, 0.0032850206, 0.0038508752, -0.009704393, -0.0016203842};
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
Dictionary content = new Dictionary {
{ "embedding", vector }
};
@@ -1200,7 +1199,7 @@ public void SentencesTestFull()
string s2 = "As I was walking that ribbon of highway,\nI saw above me that endless skyway:\nI saw below me that golden valley:\nThis land was made for you and me.";
List sentences = new List() { s0, s1, s2 };
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
Dictionary content = new Dictionary {
{ "sentences", sentences }
};
@@ -1256,7 +1255,7 @@ public void SentimentTestFull()
RosetteSentimentEntity e1 = new RosetteSentimentEntity("The Hollywood Reporter", "The Hollywood Reporter", new EntityID("Q61503"), "ORGANIZATION", 1, "pos", (double)0.5338094035254866);
List entities = new List() { e0, e1 };
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
Dictionary content = new Dictionary {
{ "document", docSentiment },
{ "entities", entities }
@@ -1356,7 +1355,7 @@ public void SyntaxDependenciesTestFull()
List sentences = new List() { sentence };
List tokens = new List() { "Sony", "Pictures", "is", "planning", "."};
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
Dictionary content = new Dictionary {
{ "sentences", sentences },
{ "tokens", tokens }
@@ -1420,7 +1419,7 @@ public void TokensTestFull()
"会议"
};
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
Dictionary content = new Dictionary {
{ "tokens", tokens }
};
@@ -1477,7 +1476,7 @@ public void NameTranslationTestFull()
string targetScheme = "IC";
double confidence = (double)0.06856099342585828;
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
Dictionary content = new Dictionary {
{ "translation", translation },
{ "targetLanguage", targetLanguage },
@@ -1543,7 +1542,7 @@ public void TopicsTestFull() {
new KeyPhrase("Nicholas Hoult", null)
};
string headersAsString = " { \"Content-Type\": \"application/json\", \"date\": \"Thu, 11 Aug 2016 15:47:32 GMT\", \"server\": \"openresty\", \"strict-transport-security\": \"max-age=63072000; includeSubdomains; preload\", \"x-rosetteapi-app-id\": \"1409611723442\", \"x-rosetteapi-concurrency\": \"50\", \"x-rosetteapi-request-id\": \"d4176692-4f14-42d7-8c26-4b2d8f7ff049\", \"content-length\": \"72\", \"connection\": \"Close\" }";
- Dictionary responseHeaders = new JavaScriptSerializer().Deserialize>(headersAsString);
+ Dictionary responseHeaders = JsonConvert.DeserializeObject>(headersAsString);
Dictionary content = new Dictionary {
{ "concepts", concepts },
{ "keyphrases", keyPhrases }
diff --git a/rosette_api/CategoriesResponse.cs b/rosette_api/CategoriesResponse.cs
index 73c54d7a..941b9006 100644
--- a/rosette_api/CategoriesResponse.cs
+++ b/rosette_api/CategoriesResponse.cs
@@ -1,13 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using System.Net.Http;
-using System.Collections;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
-using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
namespace rosette_api
diff --git a/rosette_api/IEnumerableExpanderContractResolver.cs b/rosette_api/IEnumerableExpanderContractResolver.cs
deleted file mode 100644
index adc40489..00000000
--- a/rosette_api/IEnumerableExpanderContractResolver.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Serialization;
-using Newtonsoft.Json.Linq;
-using System.Reflection;
-
-namespace rosette_api
-{
- internal class IEnumerableExpanderContractResolver : IContractResolver
- {
- public new static readonly ConditionalContractResolver Instance = new ConditionalContractResolver();
-
- protected override IList CreateProperties(Type type, MemberSerialization memberSerialization)
- {
- IList property = base.CreateProperties(typeof(T), memberSerialization);
- return property;
- }
-
- public JsonContract ResolveContract(Type type)
- {
- return new JsonArrayContract(type).ItemConverter.;
- }
- }
-}
diff --git a/rosette_api/Properties/AssemblyInfo.cs b/rosette_api/Properties/AssemblyInfo.cs
deleted file mode 100644
index d381b290..00000000
--- a/rosette_api/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Rosette API C# Binding")]
-[assembly: AssemblyDescription("Provides a C# interface to the Rosette API web service")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Basis Technology")]
-[assembly: AssemblyProduct("CSharp Binding")]
-[assembly: AssemblyCopyright("Copyright © Basis Technology 2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("620cf3eb-35fa-4c7a-a659-676b9e4a1b51")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.8.1.0")]
-[assembly: AssemblyVersion("1.8.1.0")]
-[assembly: AssemblyFileVersion("1.8.1.0")]
diff --git a/rosette_api/Properties/Resources.Designer.cs b/rosette_api/Properties/Resources.Designer.cs
deleted file mode 100644
index c09ad37f..00000000
--- a/rosette_api/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.0
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace rosette_api.Properties {
- using System;
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("rosette_api.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/rosette_api/Properties/Resources.resx b/rosette_api/Properties/Resources.resx
deleted file mode 100644
index af7dbebb..00000000
--- a/rosette_api/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/rosette_api/Properties/Settings.Designer.cs b/rosette_api/Properties/Settings.Designer.cs
deleted file mode 100644
index 943d70e6..00000000
--- a/rosette_api/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.0
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace rosette_api.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/rosette_api/Properties/Settings.settings b/rosette_api/Properties/Settings.settings
deleted file mode 100644
index 39645652..00000000
--- a/rosette_api/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/rosette_api/app.config b/rosette_api/app.config
deleted file mode 100644
index 51278a45..00000000
--- a/rosette_api/app.config
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/rosette_api/packages.config b/rosette_api/packages.config
deleted file mode 100755
index 9517ce02..00000000
--- a/rosette_api/packages.config
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/rosette_api/rosette_api.csproj b/rosette_api/rosette_api.csproj
index 3a5b506c..52675953 100644
--- a/rosette_api/rosette_api.csproj
+++ b/rosette_api/rosette_api.csproj
@@ -1,119 +1,11 @@
-
-
-
+
+
- Debug
- AnyCPU
- {D719A8A7-C5C7-49CF-BFFC-523D605E5E37}
- Library
- Properties
- rosette_api
- rosette_api
- v4.5
- 512
-
-
-
+ netcoreapp2.0
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- false
- bin\Debug\rosette_api.XML
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- false
-
-
-
-
-
-
- ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
- Designer
-
-
- True
- Resources.resx
- True
-
-
- Designer
-
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
- True
- Settings.settings
- True
-
+
-
-
-
\ No newline at end of file
+
+
diff --git a/rosette_api/rosette_api.nuspec b/rosette_api/rosette_api.nuspec
deleted file mode 100644
index 88998dc8..00000000
--- a/rosette_api/rosette_api.nuspec
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
- rosette_api
- 1.8.1
- basistech
- basistech
- http://www.apache.org/licenses/LICENSE-2.0
- false
- .Net (C#) Binding for Rosette API
- .Net (C#) Binding updated for Rosette API
- Copyright 2017
- RosetteAPI
-
-
-
-
-
-
-
-
-
-
-
diff --git a/rosette_apiUnitTests/Properties/AssemblyInfo.cs b/rosette_apiUnitTests/Properties/AssemblyInfo.cs
deleted file mode 100644
index a4eef44b..00000000
--- a/rosette_apiUnitTests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Rosette API Unit Tests")]
-[assembly: AssemblyDescription("Provides testing for the Rosette API C# Binding")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Basis Technology")]
-[assembly: AssemblyProduct("Rosette API")]
-[assembly: AssemblyCopyright("2016 Basis Technology Corp")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("02d49180-2983-4cda-84f6-dc3ce79efe00")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/rosette_apiUnitTests/app.config b/rosette_apiUnitTests/app.config
deleted file mode 100755
index 7c63cadb..00000000
--- a/rosette_apiUnitTests/app.config
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/rosette_apiUnitTests/packages.config b/rosette_apiUnitTests/packages.config
deleted file mode 100755
index 9a6be9c5..00000000
--- a/rosette_apiUnitTests/packages.config
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/rosette_apiUnitTests/rosette_apiUnitTests.csproj b/rosette_apiUnitTests/rosette_apiUnitTests.csproj
deleted file mode 100644
index c4dfd134..00000000
--- a/rosette_apiUnitTests/rosette_apiUnitTests.csproj
+++ /dev/null
@@ -1,150 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {10EAD22C-041F-4436-A391-935897309C23}
- Library
- Properties
- rosette_apiUnitTests
- rosette_apiUnitTests
- v4.5.2
- 512
- {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 10.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
- $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages
- False
- UnitTest
-
-
-
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- false
- true
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- false
-
-
-
-
-
-
- ..\packages\LinqToExcel.1.11.0\lib\LinqToExcel.dll
-
-
- ..\packages\log4net.2.0.8\lib\net45-full\log4net.dll
-
-
- ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
-
-
- ..\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll
-
-
- ..\packages\LinqToExcel.1.11.0\lib\Remotion.dll
-
-
- ..\packages\LinqToExcel.1.11.0\lib\Remotion.Data.Linq.dll
-
-
- ..\packages\LinqToExcel.1.11.0\lib\Remotion.Interfaces.dll
-
-
- ..\packages\RichardSzalay.MockHttp.3.2.1\lib\net45\RichardSzalay.MockHttp.dll
-
-
-
- 3.5
-
-
-
- ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll
-
-
- ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {d719a8a7-c5c7-49cf-bffc-523d605e5e37}
- rosette_api
-
-
-
-
- Designer
-
-
-
-
-
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
-
-
-
-
-
-
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
\ No newline at end of file