From bbaef210b59f525e286e8691f9be702f60ef4883 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 4 Oct 2024 15:08:30 +0200 Subject: [PATCH 01/15] WS-3224: add gender --- rosette_api/Gender.cs | 16 ++++++++++++++++ rosette_api/Name.cs | 13 ++++++++++++- rosette_api/rosette_api.csproj | 1 + 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 rosette_api/Gender.cs diff --git a/rosette_api/Gender.cs b/rosette_api/Gender.cs new file mode 100644 index 00000000..495fa56d --- /dev/null +++ b/rosette_api/Gender.cs @@ -0,0 +1,16 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace rosette_api +{ + /// + /// Possible gender options for the Name objects + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum Gender + { + Female, + NonBinary, + Male + } +} \ No newline at end of file diff --git a/rosette_api/Name.cs b/rosette_api/Name.cs index eccad8a7..7515f409 100644 --- a/rosette_api/Name.cs +++ b/rosette_api/Name.cs @@ -17,12 +17,14 @@ public class Name /// (string, optional): Language: ISO 639-3 code (ignored for the /language endpoint) /// (string, optional): ISO 15924 code for the name's script /// (string, optional): Entity type of the name: PERSON, LOCATION, or ORGANIZATION - public Name(string Text = null, string Language = null, string Script = null, string EntityType = null) + /// (Gender, optional): gender: Gender of the name: Female, Male, NonBinary + public Name(string Text = null, string Language = null, string Script = null, string EntityType = null, Gender? Gender = null) { text = Text; language = Language; script = Script; entityType = EntityType; + gender = Gender; } /// text @@ -56,5 +58,14 @@ public Name(string Text = null, string Language = null, string Script = null, st /// /// public string entityType { get; set; } + + /// gender + /// + /// Getter, Setter for the gender + /// gender: Gender of the name + /// + /// + public Gender? gender { get; set; } + } } diff --git a/rosette_api/rosette_api.csproj b/rosette_api/rosette_api.csproj index 0974c02d..38f84b34 100644 --- a/rosette_api/rosette_api.csproj +++ b/rosette_api/rosette_api.csproj @@ -61,6 +61,7 @@ + From 1ede537262cc995ada396a3908601a16b7fe3c3f Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 7 Oct 2024 08:28:15 +0200 Subject: [PATCH 02/15] WS-3270: update test --- rosette_apiUnitTests/rosette_apiUnitTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rosette_apiUnitTests/rosette_apiUnitTests.cs b/rosette_apiUnitTests/rosette_apiUnitTests.cs index 367b2c69..06e7db3c 100755 --- a/rosette_apiUnitTests/rosette_apiUnitTests.cs +++ b/rosette_apiUnitTests/rosette_apiUnitTests.cs @@ -1175,7 +1175,7 @@ public void NameSimilarityTestFull() String mockedContent = expected.ContentToString(); HttpResponseMessage mockedMessage = MakeMockedMessage(responseHeaders, HttpStatusCode.OK, mockedContent); _mockHttp.When(_testUrl + "name-similarity").Respond(req => mockedMessage); - NameSimilarityResponse response = _rosetteApi.NameSimilarity(new Name("Влади́мир Влади́мирович Пу́тин", "rus", null, "PERSON"), new Name("Vladmir Putin", "eng", null, "PERSON")); + NameSimilarityResponse response = _rosetteApi.NameSimilarity(new Name("Влади́мир Влади́мирович Пу́тин", "rus", null, "PERSON", Gender.Male), new Name("Vladmir Putin", "eng", null, "PERSON")); Assert.AreEqual(expected, response); } From 842eac05a6c82837bb14b767625810c4741ee880 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Tue, 22 Oct 2024 17:41:54 +0200 Subject: [PATCH 03/15] WS-3270: update urls adn api key ehaders, mark information to change --- rosette_api/CAPI.cs | 6 +++--- rosette_api/Properties/AssemblyInfo.cs | 4 ++-- rosette_api/rosette_api.nuspec | 2 +- rosette_apiUnitTests/Properties/AssemblyInfo.cs | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/rosette_api/CAPI.cs b/rosette_api/CAPI.cs index adb69ce9..c6de8bd0 100644 --- a/rosette_api/CAPI.cs +++ b/rosette_api/CAPI.cs @@ -108,10 +108,10 @@ public class CAPI /// (string, optional): Base URL for the HttpClient requests. If none is given, will use the default API URI /// (int, optional): Maximum number of times to retry a request on HttpResponse error. Default is 3 times. /// (HttpClient, optional): Forces the API to use a custom HttpClient. - public CAPI(string user_key, string uristring = "https://api.rosette.com/rest/v1/", int maxRetry = 5, HttpClient client = null) + public CAPI(string user_key, string uristring = "https://analytics.babelstreet.com/rest/v1/", int maxRetry = 5, HttpClient client = null) { UserKey = user_key; - URIstring = uristring ?? "https://api.rosette.com/rest/v1/"; + URIstring = uristring ?? "https://analytics.babelstreet.com/rest/v1/"; if (!URIstring.EndsWith("/")) { URIstring = URIstring + "/"; @@ -1562,7 +1562,7 @@ private void SetupClient(bool forceReset = false) Debug = _debug; // Standard headers, which are required for Rosette API - AddRequestHeader("X-RosetteAPI-Key", UserKey ?? "not-provided"); + AddRequestHeader("X-BabelStreetAPI-Key", UserKey ?? "not-provided"); AddRequestHeader("User-Agent", UserAgent); AddRequestHeader("X-RosetteAPI-Binding", "csharp"); AddRequestHeader("X-RosetteAPI-Binding-Version", Version); diff --git a/rosette_api/Properties/AssemblyInfo.cs b/rosette_api/Properties/AssemblyInfo.cs index 296fb523..d5389c78 100644 --- a/rosette_api/Properties/AssemblyInfo.cs +++ b/rosette_api/Properties/AssemblyInfo.cs @@ -8,9 +8,9 @@ [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: AssemblyCompany("Babel Street")] [assembly: AssemblyProduct("CSharp Binding")] -[assembly: AssemblyCopyright("Copyright © Basis Technology 2017")] +[assembly: AssemblyCopyright("Copyright © Basis Technology 2017")] ??? [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/rosette_api/rosette_api.nuspec b/rosette_api/rosette_api.nuspec index 778497bb..48f863ff 100644 --- a/rosette_api/rosette_api.nuspec +++ b/rosette_api/rosette_api.nuspec @@ -4,7 +4,7 @@ rosette_api 1.30.0 .Net (C#) Binding for Rosette API - +!!! basistech Rosette by Babel Street Copyright 2014-2023 Basis Technology Corp. diff --git a/rosette_apiUnitTests/Properties/AssemblyInfo.cs b/rosette_apiUnitTests/Properties/AssemblyInfo.cs index a4eef44b..8d8e5745 100644 --- a/rosette_apiUnitTests/Properties/AssemblyInfo.cs +++ b/rosette_apiUnitTests/Properties/AssemblyInfo.cs @@ -7,6 +7,7 @@ // 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")] From 242bbb4fd5e91cf7dd550d43d07ec8f2b416d71a Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Thu, 24 Oct 2024 15:12:49 +0200 Subject: [PATCH 04/15] WS-3270: branding updates --- README.md | 38 +++++++++++++++++++------- rosette_api/Properties/AssemblyInfo.cs | 4 +-- rosette_api/rosette_api.nuspec | 3 +- rosette_apiExamples/README.md | 10 +++---- 4 files changed, 37 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index dbe31097..9190da80 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,30 @@ -# Rosette by Babel Street +# Analytics by Babel Street --- [![NuGet version](https://badge.fury.io/nu/rosette_api.svg)](https://badge.fury.io/nu/rosette_api) -Rosette uses natural language processing, statistical modeling, and machine learning to analyze unstructured and semi-structured text across hundreds of language-script combinations, revealing valuable information and actionable data. Rosette provides endpoints for extracting entities and relationships, translating and comparing the similarity of names, categorizing and adding linguistic tags to text and more. Rosette Server is the on-premises installation of Rosette, with access to Rosette's functions as RESTful web service endpoints. This solves cloud security worries and allows customization (models/indexes) as needed for your business. +Our product is a full text processing pipeline from data preparation to extracting the most relevant information and +analysis utilizing precise, focused AI that has built-in human understanding. Text Analytics provides foundational +linguistic analysis for identifying languages and relating words. The result is enriched and normalized text for +high-speed search and processing without translation. +Text Analytics extracts events and entities — people, organizations, and places — from unstructured text and adds the +structure of associating those entities into events that deliver only the necessary information for near real-time +decision making. Accompanying tools shorten the process of training AI models to recognize domain-specific events. -## Rosette API Access -- Rosette Cloud [Sign Up](https://developer.rosette.com/signup) +The product delivers a multitude of ways to sharpen and expand search results. Semantic similarity expands search +beyond keywords to words with the same meaning, even in other languages. Sentiment analysis and topic extraction help +filter results to what’s relevant. + +## Analytics API Access +- Analytics Cloud [Sign Up](https://developer.babelstreet.com/signup) ## Quick Start #### Installation -If you use Nuget, you may use either Visual Studio's Nuget package manager or command line to install the Rosette API binding. +If you use Nuget, you may use either Visual Studio's Nuget package manager or command line to install the Analytics API binding. In Visual Studio: search for the [rosette_api package](https://www.nuget.org/packages/rosette_api/) in Nuget and follow the installation instructions. @@ -30,16 +40,24 @@ in the [examples](https://github.com/rosette-api/csharp/tree/develop/rosette_api #### Documentation & Support - [Binding API](https://rosette-api.github.io/csharp/) -- [Rosette Platform API](https://docs.babelstreet.com/API/en/index-en.html) +- [Analytics Platform API](https://docs.babelstreet.com/API/en/index-en.html) - [Binding Release Notes](https://github.com/rosette-api/csharp/wiki/Release-Notes) -- [Rosette Platform Release Notes](https://babelstreet.my.site.com/support/s/article/Rosette-Cloud-Release-Notes) +- [Analytics Platform Release Notes](https://docs.babelstreet.com/Release/en/rosette-cloud.html) - [Support](https://babelstreet.my.site.com/support/s/) - [Binding License: Apache 2.0](https://github.com/rosette-api/csharp/blob/develop/LICENSE.txt) ## Concurrency -The C# binding uses HttpClient to manage connectivity and concurrency. By default, .NET sets the default connection limit to 2, which is the same as the Rosette API default limit. For Rosette API plans that allow for higher concurrency, the internal HTTP client will adjust automatically to the higher number. If a user chooses to provide their own HTTP client, no adjustment will be made. In this case it is up to the user to set `ServicePointManager.DefaultConnectionLimit` to the Rosette API concurrency level prior to instantiating the CAPI object. - -For multithreaded operations, do not instantiate a new CAPI object for each thread. The objects will not share the connection limit and `429 too many requests` errors are likely to occur. Rather, so that the underlying HttpClient can manage the queueing of the requests across all threads, instantiate a CAPI object and pass it to each thread. If it is necessary to instantiate a CAPI object on each thread, first create an HttpClient object, either by retrieving it from an instance of CAPI via the `Client` property or by creating your own HTTP client and passing it into each thread for use by the CAPI constructor. +The C# binding uses HttpClient to manage connectivity and concurrency. By default, .NET sets the default connection +limit to 2, which is the same as the Analytics API default limit. For Analytics API plans that allow for higher +concurrency, the internal HTTP client will adjust automatically to the higher number. If a user chooses to provide +their own HTTP client, no adjustment will be made. In this case it is up to the user to set +`ServicePointManager.DefaultConnectionLimit` to the Analytics API concurrency level prior to instantiating the CAPI object. + +For multithreaded operations, do not instantiate a new CAPI object for each thread. The objects will not share the +connection limit and `429 too many requests` errors are likely to occur. Rather, so that the underlying HttpClient can +manage the queueing of the requests across all threads, instantiate a CAPI object and pass it to each thread. If it is +necessary to instantiate a CAPI object on each thread, first create an HttpClient object, either by retrieving it from +an instance of CAPI via the `Client` property or by creating your own HTTP client and passing it into each thread for use by the CAPI constructor. #### Example of using a common CAPI object for each thread: ``` diff --git a/rosette_api/Properties/AssemblyInfo.cs b/rosette_api/Properties/AssemblyInfo.cs index d5389c78..46e4c31e 100644 --- a/rosette_api/Properties/AssemblyInfo.cs +++ b/rosette_api/Properties/AssemblyInfo.cs @@ -5,8 +5,8 @@ // 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: AssemblyTitle("Babel Street Analytics API C# Binding")] +[assembly: AssemblyDescription("Provides a C# interface to the Babel Street Analytics API web service")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Babel Street")] [assembly: AssemblyProduct("CSharp Binding")] diff --git a/rosette_api/rosette_api.nuspec b/rosette_api/rosette_api.nuspec index 48f863ff..af7f1378 100644 --- a/rosette_api/rosette_api.nuspec +++ b/rosette_api/rosette_api.nuspec @@ -1,10 +1,10 @@ + rosette_api 1.30.0 .Net (C#) Binding for Rosette API -!!! basistech Rosette by Babel Street Copyright 2014-2023 Basis Technology Corp. @@ -23,6 +23,7 @@ + diff --git a/rosette_apiExamples/README.md b/rosette_apiExamples/README.md index a0430907..d14801f3 100644 --- a/rosette_apiExamples/README.md +++ b/rosette_apiExamples/README.md @@ -1,11 +1,11 @@ ## Endpoint Examples -These examples are scripts that can be run independently to demonstrate the Rosette API functionality. +These examples are scripts that can be run independently to demonstrate the Babel Street Analytics API functionality. -Each example file demonstrates one of the capabilities of the Rosette Platform. Each example, when run, prints its output to the console. +Each example file demonstrates one of the capabilities of the Analytics Platform. Each example, when run, prints its output to the console. Each example will also accept an optional, alternate url parameter for overriding the default URL. -A note on prerequisites. Rosette API only supports TLS 1.2 so ensure your toolchain also supports it. +A note on prerequisites. Analytics API only supports TLS 1.2 so ensure your toolchain also supports it. Here are some methods for running the examples. @@ -34,7 +34,7 @@ Here are some methods for running the examples. cd rosette_apiExamples csc language.cs /r:rosette_api.dll /r:System.Net.Http.dll /r:System.Web.Extensions.dll ``` -- Run the compiled example against Rosette Cloud. In this example, your Cloud API key is stored in the environment variable `$API_KEY`. +- Run the compiled example against Analytics Cloud. In this example, your Cloud API key is stored in the environment variable `$API_KEY`. ``` mono language.exe $API_KEY ``` @@ -76,7 +76,7 @@ Here are some methods for running the examples. cd rosette_apiExamples csc language.cs /r:rosette_api.dll /r:System.Net.Http.dll /r:System.Web.Extensions.dll ``` -- Run the compiled example against Rosette Cloud. In this example, your Cloud API key is stored in the environment variable `$API_KEY`. +- Run the compiled example against Analytics Cloud. In this example, your Cloud API key is stored in the environment variable `$API_KEY`. ``` mono language.exe $API_KEY ``` From e8eee92fda590d328e0b29136dd3ece740d732c2 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Thu, 24 Oct 2024 15:40:06 +0200 Subject: [PATCH 05/15] WS-3270: updates in example comments --- rosette_apiExamples/address_similarity.cs | 2 +- rosette_apiExamples/categories.cs | 4 ++-- rosette_apiExamples/entities.cs | 2 +- rosette_apiExamples/events.cs | 2 +- rosette_apiExamples/events_negation.cs | 2 +- rosette_apiExamples/info.cs | 2 +- rosette_apiExamples/language.cs | 2 +- rosette_apiExamples/language_multilingual.cs | 2 +- rosette_apiExamples/morphology_complete.cs | 2 +- rosette_apiExamples/morphology_compound-components.cs | 2 +- rosette_apiExamples/morphology_han-readings.cs | 2 +- rosette_apiExamples/morphology_lemmas.cs | 2 +- rosette_apiExamples/morphology_parts-of-speech.cs | 2 +- rosette_apiExamples/name_deduplication.cs | 2 +- rosette_apiExamples/name_similarity.cs | 2 +- rosette_apiExamples/name_translation.cs | 2 +- rosette_apiExamples/ping.cs | 2 +- rosette_apiExamples/record_similarity.cs | 2 +- rosette_apiExamples/relationships.cs | 2 +- rosette_apiExamples/semantic_vectors.cs | 2 +- rosette_apiExamples/sentences.cs | 2 +- rosette_apiExamples/sentiment.cs | 4 ++-- rosette_apiExamples/similar_terms.cs | 2 +- rosette_apiExamples/syntax_dependencies.cs | 2 +- rosette_apiExamples/tokens.cs | 2 +- rosette_apiExamples/topics.cs | 2 +- rosette_apiExamples/transliteration.cs | 2 +- 27 files changed, 29 insertions(+), 29 deletions(-) diff --git a/rosette_apiExamples/address_similarity.cs b/rosette_apiExamples/address_similarity.cs index eea50073..911add43 100644 --- a/rosette_apiExamples/address_similarity.cs +++ b/rosette_apiExamples/address_similarity.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class address_similarity { /// - /// Example code to call Rosette API to get match score (similarity) for two addresses. + /// Example code to call Analytics API to get match score (similarity) for two addresses. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/categories.cs b/rosette_apiExamples/categories.cs index d02df4e3..484a9c88 100644 --- a/rosette_apiExamples/categories.cs +++ b/rosette_apiExamples/categories.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class categories { /// - /// Example code to call Rosette API to get a document's (located at given URL) categories. + /// Example code to call Analytics API to get a document's (located at given URL) categories. /// Requires Nuget Package: /// rosette_api /// @@ -36,7 +36,7 @@ static void Main(string[] args) CategoriesResponse response = CategoriesCAPI.Categories(categories_text_data, null, null, null); Console.WriteLine(response.ContentAsJson); - //Rosette API also supports Dictionary inputs + //Analytics API also supports Dictionary inputs //Simply instantiate a new dictionary object with the fields options as keys and inputs as values response = CategoriesCAPI.Categories(new Dictionary() { diff --git a/rosette_apiExamples/entities.cs b/rosette_apiExamples/entities.cs index 77252ddd..3d09afda 100644 --- a/rosette_apiExamples/entities.cs +++ b/rosette_apiExamples/entities.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class entities { /// - /// Example code to call Rosette API to get entities from a piece of text. + /// Example code to call Analytics API to get entities from a piece of text. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/events.cs b/rosette_apiExamples/events.cs index 7263cff3..2c593a9c 100644 --- a/rosette_apiExamples/events.cs +++ b/rosette_apiExamples/events.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class events { /// - /// Example code to call Rosette API to get events from a piece of text. + /// Example code to call Analytics API to get events from a piece of text. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/events_negation.cs b/rosette_apiExamples/events_negation.cs index c141be99..d51ee104 100644 --- a/rosette_apiExamples/events_negation.cs +++ b/rosette_apiExamples/events_negation.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class events_negation { /// - /// Example code to call Rosette API to get events from a piece of text. + /// Example code to call Analytics API to get events from a piece of text. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/info.cs b/rosette_apiExamples/info.cs index e7cb42da..ca589bb3 100644 --- a/rosette_apiExamples/info.cs +++ b/rosette_apiExamples/info.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class info { /// - /// Example code to call Rosette API to get information such as version and build. + /// Example code to call Analytics API to get information such as version and build. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/language.cs b/rosette_apiExamples/language.cs index e790f98d..7feb0757 100644 --- a/rosette_apiExamples/language.cs +++ b/rosette_apiExamples/language.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class language { /// - /// Example code to call Rosette API to detect possible languages for a piece of text. + /// Example code to call Analytics API to detect possible languages for a piece of text. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/language_multilingual.cs b/rosette_apiExamples/language_multilingual.cs index 15e7d89a..9270b2b2 100644 --- a/rosette_apiExamples/language_multilingual.cs +++ b/rosette_apiExamples/language_multilingual.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class language { /// - /// Example code to call Rosette API to detect possible languages for a piece of text. + /// Example code to call Analytics API to detect possible languages for a piece of text. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/morphology_complete.cs b/rosette_apiExamples/morphology_complete.cs index a3651e64..ed3f03b8 100644 --- a/rosette_apiExamples/morphology_complete.cs +++ b/rosette_apiExamples/morphology_complete.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class morphology_complete { /// - /// Example code to call Rosette API to get the complete set of morphological analysis results for a piece of text. + /// Example code to call Analytics API to get the complete set of morphological analysis results for a piece of text. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/morphology_compound-components.cs b/rosette_apiExamples/morphology_compound-components.cs index 9d0c9ecd..a42c67e2 100644 --- a/rosette_apiExamples/morphology_compound-components.cs +++ b/rosette_apiExamples/morphology_compound-components.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class morphology_compound_components { /// - /// Example code to call Rosette API to get de-compounded words from a piece of text. + /// Example code to call Analytics API to get de-compounded words from a piece of text. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/morphology_han-readings.cs b/rosette_apiExamples/morphology_han-readings.cs index 96480f7b..b350b1e7 100644 --- a/rosette_apiExamples/morphology_han-readings.cs +++ b/rosette_apiExamples/morphology_han-readings.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class morphology_han_readings { /// - /// Example code to call Rosette API to get Chinese readings for words in a piece of text. + /// Example code to call Analytics API to get Chinese readings for words in a piece of text. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/morphology_lemmas.cs b/rosette_apiExamples/morphology_lemmas.cs index 4eb66edf..007e6fdf 100644 --- a/rosette_apiExamples/morphology_lemmas.cs +++ b/rosette_apiExamples/morphology_lemmas.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class morphology_lemmas { /// - /// Example code to call Rosette API to get lemmas for words in a piece of text. + /// Example code to call Analytics API to get lemmas for words in a piece of text. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/morphology_parts-of-speech.cs b/rosette_apiExamples/morphology_parts-of-speech.cs index e2fcc359..050b5d5b 100644 --- a/rosette_apiExamples/morphology_parts-of-speech.cs +++ b/rosette_apiExamples/morphology_parts-of-speech.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class morphology_parts_of_speech { /// - /// Example code to call Rosette API to get part-of-speech tags for words a piece of text. + /// Example code to call Analytics API to get part-of-speech tags for words a piece of text. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/name_deduplication.cs b/rosette_apiExamples/name_deduplication.cs index f0f93226..6cb9f7eb 100644 --- a/rosette_apiExamples/name_deduplication.cs +++ b/rosette_apiExamples/name_deduplication.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class name_deduplication { /// - /// Example code to call Rosette API to deduplication a list of names. + /// Example code to call Analytics API to deduplication a list of names. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/name_similarity.cs b/rosette_apiExamples/name_similarity.cs index 84f88fa8..295a7a60 100644 --- a/rosette_apiExamples/name_similarity.cs +++ b/rosette_apiExamples/name_similarity.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class matched_name { /// - /// Example code to call Rosette API to get match score (similarity) for two names. + /// Example code to call Analytics API to get match score (similarity) for two names. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/name_translation.cs b/rosette_apiExamples/name_translation.cs index 068cee8c..cb151e92 100644 --- a/rosette_apiExamples/name_translation.cs +++ b/rosette_apiExamples/name_translation.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class translated_name { /// - /// Example code to call Rosette API to translate a name from language to another. + /// Example code to call Analytics API to translate a name from language to another. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/ping.cs b/rosette_apiExamples/ping.cs index 68f77ac6..0536b690 100644 --- a/rosette_apiExamples/ping.cs +++ b/rosette_apiExamples/ping.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class ping { /// - /// Example code to send Rosette API a ping to check its reachability. + /// Example code to send Analytics API a ping to check its reachability. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/record_similarity.cs b/rosette_apiExamples/record_similarity.cs index f0e23f59..9b066668 100644 --- a/rosette_apiExamples/record_similarity.cs +++ b/rosette_apiExamples/record_similarity.cs @@ -8,7 +8,7 @@ namespace rosette_apiExamples class record_similarity { /// - /// Example code to call Rosette API to get record similarity scores between two list of records + /// Example code to call Analytics API to get record similarity scores between two list of records /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/relationships.cs b/rosette_apiExamples/relationships.cs index 08f0f3b8..6dc27a57 100644 --- a/rosette_apiExamples/relationships.cs +++ b/rosette_apiExamples/relationships.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class relationships { /// - /// Example code to call Rosette API to get sentences in a piece of text. + /// Example code to call Analytics API to get sentences in a piece of text. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/semantic_vectors.cs b/rosette_apiExamples/semantic_vectors.cs index 34cbf53b..d4fc25b4 100644 --- a/rosette_apiExamples/semantic_vectors.cs +++ b/rosette_apiExamples/semantic_vectors.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class semantic_vectors { /// - /// Example code to call Rosette API to get an input's text-vector. + /// Example code to call Analytics API to get an input's text-vector. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/sentences.cs b/rosette_apiExamples/sentences.cs index 6dd3cd44..6f96d846 100644 --- a/rosette_apiExamples/sentences.cs +++ b/rosette_apiExamples/sentences.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class sentences { /// - /// Example code to call Rosette API to get sentences in a piece of text. + /// Example code to call Analytics API to get sentences in a piece of text. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/sentiment.cs b/rosette_apiExamples/sentiment.cs index 1a556987..8e3825da 100644 --- a/rosette_apiExamples/sentiment.cs +++ b/rosette_apiExamples/sentiment.cs @@ -12,7 +12,7 @@ namespace rosette_apiExamples class sentiment { /// - /// Example code to call Rosette API to get a document's sentiment + /// Example code to call Analytics API to get a document's sentiment /// Requires Nuget Package: /// rosette_api /// @@ -39,7 +39,7 @@ static void Main(string[] args) sw.WriteLine(sentiment_file_data); sw.Flush(); sw.Close(); - //Rosette API provides File upload options (shown here) + //Analytics API provides File upload options (shown here) //Simply create a new RosetteFile using the path to a file //The results of the API call will come back in the form of a Dictionary SentimentResponse response = SentimentCAPI.Sentiment(new RosetteFile(newFile, @"application/octet-stream", "{\"language\":\"eng\"}")); diff --git a/rosette_apiExamples/similar_terms.cs b/rosette_apiExamples/similar_terms.cs index 98f76f35..fcccae51 100644 --- a/rosette_apiExamples/similar_terms.cs +++ b/rosette_apiExamples/similar_terms.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class similar_terms { /// - /// Example code to call Rosette API to get an input's similar terms. + /// Example code to call Analytics API to get an input's similar terms. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/syntax_dependencies.cs b/rosette_apiExamples/syntax_dependencies.cs index 764d4066..54fccc0f 100644 --- a/rosette_apiExamples/syntax_dependencies.cs +++ b/rosette_apiExamples/syntax_dependencies.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class entities { /// - /// Example code to call Rosette API to get syntax dependencies from a piece of text. + /// Example code to call Analytics API to get syntax dependencies from a piece of text. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/tokens.cs b/rosette_apiExamples/tokens.cs index 6ab032ad..7d732366 100644 --- a/rosette_apiExamples/tokens.cs +++ b/rosette_apiExamples/tokens.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class tokens { /// - /// Example code to call Rosette API to get tokens (words) in a piece of text. + /// Example code to call Analytics API to get tokens (words) in a piece of text. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/topics.cs b/rosette_apiExamples/topics.cs index 15fa0071..16a6d970 100644 --- a/rosette_apiExamples/topics.cs +++ b/rosette_apiExamples/topics.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class topics { /// - /// Example code to call Rosette API to get concepts and key phrases in a piece of text. + /// Example code to call Analytics API to get concepts and key phrases in a piece of text. /// Requires Nuget Package: /// rosette_api /// diff --git a/rosette_apiExamples/transliteration.cs b/rosette_apiExamples/transliteration.cs index 7d07357d..20f117fb 100644 --- a/rosette_apiExamples/transliteration.cs +++ b/rosette_apiExamples/transliteration.cs @@ -11,7 +11,7 @@ namespace rosette_apiExamples class transliteration { /// - /// Example code to call Rosette API to transliterate a name. + /// Example code to call Analytics API to transliterate a name. /// Requires Nuget Package: /// rosette_api /// From 4ae625704ad29313c06553c72f6b75c535aa35d8 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 25 Oct 2024 12:46:46 +0200 Subject: [PATCH 06/15] WS-3270: logo dark and light version --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9190da80..ce3d70e6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,11 @@ - + + + + + Babel Street Logo + + + # Analytics by Babel Street --- From 367800d4f18682bbe42435eedaadef116ae40cc7 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 25 Oct 2024 15:04:41 +0200 Subject: [PATCH 07/15] WS-3270: remove markers --- rosette_api/Properties/AssemblyInfo.cs | 2 +- rosette_apiUnitTests/Properties/AssemblyInfo.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/rosette_api/Properties/AssemblyInfo.cs b/rosette_api/Properties/AssemblyInfo.cs index 46e4c31e..72c5b0a6 100644 --- a/rosette_api/Properties/AssemblyInfo.cs +++ b/rosette_api/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Babel Street")] [assembly: AssemblyProduct("CSharp Binding")] -[assembly: AssemblyCopyright("Copyright © Basis Technology 2017")] ??? +[assembly: AssemblyCopyright("Copyright © Basis Technology 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/rosette_apiUnitTests/Properties/AssemblyInfo.cs b/rosette_apiUnitTests/Properties/AssemblyInfo.cs index 8d8e5745..a4eef44b 100644 --- a/rosette_apiUnitTests/Properties/AssemblyInfo.cs +++ b/rosette_apiUnitTests/Properties/AssemblyInfo.cs @@ -7,7 +7,6 @@ // 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")] From 4c02caf5ef5e77ee5400e000a8fc2603f72e7a40 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 28 Oct 2024 11:53:21 +0100 Subject: [PATCH 08/15] WS-3270: documentation updates --- rosette_api/AddressSimilarityResponse.cs | 2 +- rosette_api/CAPI.cs | 50 +++++++++---------- rosette_api/InfoResponse.cs | 2 +- rosette_api/LanguageIdentificationResponse.cs | 2 +- rosette_api/MorphologyResponse.cs | 4 +- rosette_api/NameDeduplicationResponse.cs | 2 +- rosette_api/NameSimilarityResponse.cs | 2 +- rosette_api/PingResponse.cs | 2 +- rosette_api/RecordSimilarityResponse.cs | 4 +- rosette_api/RelationshipsResponse.cs | 8 +-- rosette_api/ResponseHeaders.cs | 4 +- rosette_api/RosetteException.cs | 4 +- rosette_api/RosetteExtensions.cs | 2 +- rosette_api/RosetteResponse.cs | 2 +- rosette_api/SentenceTaggingResponse.cs | 4 +- rosette_api/SentimentResponse.cs | 8 +-- rosette_api/SyntaxDependenciesResponse.cs | 10 ++-- rosette_api/TokenizationResponse.cs | 2 +- rosette_api/TopicsResponse.cs | 2 +- rosette_api/TranslateNamesResponse.cs | 2 +- rosette_api/TransliterationResponse.cs | 2 +- 21 files changed, 60 insertions(+), 60 deletions(-) diff --git a/rosette_api/AddressSimilarityResponse.cs b/rosette_api/AddressSimilarityResponse.cs index 5f333c0d..610b73fc 100644 --- a/rosette_api/AddressSimilarityResponse.cs +++ b/rosette_api/AddressSimilarityResponse.cs @@ -6,7 +6,7 @@ namespace rosette_api { /// - /// A class to represnt the results from the Name Similarity endpoint of the Rosette API + /// A class to represent the results from the Address Similarity endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class AddressSimilarityResponse : RosetteResponse diff --git a/rosette_api/CAPI.cs b/rosette_api/CAPI.cs index c6de8bd0..50439bd2 100644 --- a/rosette_api/CAPI.cs +++ b/rosette_api/CAPI.cs @@ -29,9 +29,9 @@ public enum MorphologyFeature hanReadings }; - /// C# Rosette API. + /// C# Babel Street Analytics API. /// - /// Primary class for interfacing with the Rosette API + /// Primary class for interfacing with the Analytics API /// @copyright 2014-2024 Basis Technology Corporation. /// Licensed under the Apache License, Version 2.0 (the "License"); you may not use file except in compliance /// with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @@ -97,14 +97,14 @@ public class CAPI private int _concurrentConnections = 1; /// C# API class - /// Rosette Python Client Binding API; representation of a Rosette server. - /// Instance methods of the C# API provide communication with specific Rosette server endpoints. + /// Babel Street Analytics Python Client Binding API; representation of an Analytics server. + /// Instance methods of the C# API provide communication with specific Analytics server endpoints. /// Requires user_key to start and has 3 additional parameters to be specified. - /// Will run a Version Check against the Rosette Server. If the version check fails, a + /// Will run a Version Check against the Analytics Server. If the version check fails, a /// RosetteException will be thrown. /// /// - /// string: API key required by the Rosette server to allow access to endpoints + /// string: API key required by the Analytics server to allow access to endpoints /// (string, optional): Base URL for the HttpClient requests. If none is given, will use the default API URI /// (int, optional): Maximum number of times to retry a request on HttpResponse error. Default is 3 times. /// (HttpClient, optional): Forces the API to use a custom HttpClient. @@ -129,7 +129,7 @@ public CAPI(string user_key, string uristring = "https://analytics.babelstreet.c /// UserKey /// /// Getter, Setter for the UserKey - /// UserKey: API key required by the Rosette Server + /// UserKey: API key required by the Analytics Server /// Allows users to change their UserKey later (e.g. if instantiated class incorrectly) /// /// @@ -137,7 +137,7 @@ public CAPI(string user_key, string uristring = "https://analytics.babelstreet.c /// URIstring /// - /// URIString returns the current URI of the rosette server + /// URIString returns the current URI of the Analytics server /// /// public string URIstring { get; private set; } @@ -182,7 +182,7 @@ public string UserAgent /// Client /// Returns the http client instance. For externally provided http clients, this will return the same - /// client with some added headers that are required by the Rosette API. For the default internal client + /// client with some added headers that are required by the Analytics API. For the default internal client /// it will return the current instance, which is maintained at the class level. /// public HttpClient Client @@ -191,7 +191,7 @@ public HttpClient Client } /// Concurrency - /// Returns the number of concurrent connections allowed by the current Rosette API plan. + /// Returns the number of concurrent connections allowed by the current Analytics API plan. /// For externally provided http clients, it is up to the user to update the connection limit within their own software. /// For the default internal http client, the concurrent connections will adjust to the maximum allowed. /// @@ -564,7 +564,7 @@ public EventsResponse Event(RosetteFile file) /// Info /// - /// (GET)Info Endpoint: Response is a JSON string with Rosette API information including buildNumber, name, version, and buildTime. + /// (GET)Info Endpoint: Response is a JSON string with Analytics API information including buildNumber, name, version, and buildTime. /// /// /// InfoResponse containing the results of the info GET. @@ -632,7 +632,7 @@ public LanguageIdentificationResponse Language(RosetteFile file) /// (string, optional): Language: ISO 639-3 code (ignored for the /language endpoint) /// (string, optional): not used at time /// (string, optional): URI to accessible content (content and contentUri are mutually exclusive) - /// (string, optional): Description of what morphology feature to request from the Rosette server + /// (string, optional): Description of what morphology feature to request from the Analytics server /// (string, optional): genre to categorize the input data /// MorphologyResponse containing the results of the request. /// The response may include lemmas, part of speech tags, compound word components, and Han readings. @@ -650,7 +650,7 @@ public MorphologyResponse Morphology(string content = null, string language = nu /// /// /// Dictionary<object, object>: Dictionary containing parameters as (key,value) pairs - /// (string, optional): Description of what morphology feature to request from the Rosette server + /// (string, optional): Description of what morphology feature to request from the Analytics server /// MorphologyResponse containing the results of the request. /// The response may include lemmas, part of speech tags, compound word components, and Han readings. /// Support for specific return types depends on language. @@ -815,14 +815,14 @@ public TransliterationResponse Transliteration(Dictionary dict) } /// Ping - /// (GET)Ping Endpoint: Pings Rosette API for a response indicting that the service is available + /// (GET)Ping Endpoint: Pings Analytics API for a response indicting that the service is available /// /// PingResponse containing the results of the info GET. /// The reponse contains a message and time. /// /// Ping - /// (GET)Ping Endpoint: Pings Rosette API for a response indicting that the service is available + /// (GET)Ping Endpoint: Pings Analytics API for a response indicting that the service is available /// /// PingResponse containing the results of the info GET. /// The reponse contains a message and time. @@ -850,7 +850,7 @@ public PingResponse Ping() /// Among other uses, a text embedding enables you to calculate the similarity between two documents or two words. /// The text embedding represents the relationships between words in your document in the semantic space. /// The semantic space is a multilingual network that maps the input based on the words and their context. - /// Words with similar meanings have similar contexts, and Rosette maps them close to each other + /// Words with similar meanings have similar contexts, and Analytics maps them close to each other /// public TextEmbeddingResponse TextEmbedding(string content = null, string language = null, string contentType = null, string contentUri = null, string genre = null) { @@ -870,7 +870,7 @@ public TextEmbeddingResponse TextEmbedding(string content = null, string languag /// Among other uses, a text embedding enables you to calculate the similarity between two documents or two words. /// The text embedding represents the relationships between words in your document in the semantic space. /// The semantic space is a multilingual network that maps the input based on the words and their context. - /// Words with similar meanings have similar contexts, and Rosette maps them close to each other + /// Words with similar meanings have similar contexts, and Analytics maps them close to each other /// public TextEmbeddingResponse TextEmbedding(Dictionary dict) { @@ -890,7 +890,7 @@ public TextEmbeddingResponse TextEmbedding(Dictionary dict) /// Among other uses, a text embedding enables you to calculate the similarity between two documents or two words. /// The text embedding represents the relationships between words in your document in the semantic space. /// The semantic space is a multilingual network that maps the input based on the words and their context. - /// Words with similar meanings have similar contexts, and Rosette maps them close to each other + /// Words with similar meanings have similar contexts, and Analytics maps them close to each other /// public TextEmbeddingResponse TextEmbedding(RosetteFile file) { @@ -914,7 +914,7 @@ public TextEmbeddingResponse TextEmbedding(RosetteFile file) /// Among other uses, a text embedding enables you to calculate the similarity between two documents or two words. /// The text embedding represents the relationships between words in your document in the semantic space. /// The semantic space is a multilingual network that maps the input based on the words and their context. - /// Words with similar meanings have similar contexts, and Rosette maps them close to each other + /// Words with similar meanings have similar contexts, and Analytics maps them close to each other /// public SemanticVectorsResponse SemanticVectors(string content = null, string language = null, string contentType = null, string contentUri = null, string genre = null) { @@ -934,7 +934,7 @@ public SemanticVectorsResponse SemanticVectors(string content = null, string lan /// Among other uses, a text embedding enables you to calculate the similarity between two documents or two words. /// The text embedding represents the relationships between words in your document in the semantic space. /// The semantic space is a multilingual network that maps the input based on the words and their context. - /// Words with similar meanings have similar contexts, and Rosette maps them close to each other + /// Words with similar meanings have similar contexts, and Analytics maps them close to each other /// public SemanticVectorsResponse SemanticVectors(Dictionary dict) { @@ -954,7 +954,7 @@ public SemanticVectorsResponse SemanticVectors(Dictionary dict) /// Among other uses, a text embedding enables you to calculate the similarity between two documents or two words. /// The text embedding represents the relationships between words in your document in the semantic space. /// The semantic space is a multilingual network that maps the input based on the words and their context. - /// Words with similar meanings have similar contexts, and Rosette maps them close to each other + /// Words with similar meanings have similar contexts, and Analytics maps them close to each other /// public SemanticVectorsResponse SemanticVectors(RosetteFile file) { @@ -1408,7 +1408,7 @@ private string ToQueryString(NameValueCollection urlParameters) /// getResponse /// - /// getResponse: Internal function to get the response from the Rosette API server using the request + /// getResponse: Internal function to get the response from the Analytics API server using the request /// /// /// (string, optional): Content to use as the request to the server with POST. If none given, assume an Info endpoint and use GET @@ -1481,7 +1481,7 @@ private void CheckCallConcurrency(RosetteResponse response) /// Process: Internal function to convert a RosetteFile into a dictionary to use for getResponse /// /// - /// RosetteFile: File being uploaded to use as a request to the Rosette server. + /// RosetteFile: File being uploaded to use as a request to the Analytics server. /// RosetteResponse derivative containing the results of the response from the server from the getResponse call. private T Process(RosetteFile file) where T : RosetteResponse { @@ -1556,12 +1556,12 @@ private void SetupClient(bool forceReset = false) if (Client.BaseAddress == null) { - Client.BaseAddress = new Uri(URIstring); // base address must be the rosette URI regardless of whether the client is external or internal + Client.BaseAddress = new Uri(URIstring); // base address must be the Analytics URI regardless of whether the client is external or internal } Timeout = _timeout; Debug = _debug; - // Standard headers, which are required for Rosette API + // Standard headers, which are required for Analytics API AddRequestHeader("X-BabelStreetAPI-Key", UserKey ?? "not-provided"); AddRequestHeader("User-Agent", UserAgent); AddRequestHeader("X-RosetteAPI-Binding", "csharp"); diff --git a/rosette_api/InfoResponse.cs b/rosette_api/InfoResponse.cs index 0f113bf9..7d4b4ca6 100644 --- a/rosette_api/InfoResponse.cs +++ b/rosette_api/InfoResponse.cs @@ -9,7 +9,7 @@ namespace rosette_api { /// - /// A class to represent Rosette API responses when Info() is called + /// A class to represent Analytics API responses when Info() is called /// [JsonObject(MemberSerialization.OptOut)] public class InfoResponse : RosetteResponse diff --git a/rosette_api/LanguageIdentificationResponse.cs b/rosette_api/LanguageIdentificationResponse.cs index 83f9d73c..b4c62829 100644 --- a/rosette_api/LanguageIdentificationResponse.cs +++ b/rosette_api/LanguageIdentificationResponse.cs @@ -11,7 +11,7 @@ namespace rosette_api { /// - /// A class to represent responses from the Language Identification endpoint of the Rosette API + /// A class to represent responses from the Language Identification endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class LanguageIdentificationResponse : RosetteResponse diff --git a/rosette_api/MorphologyResponse.cs b/rosette_api/MorphologyResponse.cs index 61d7b65e..338a3b93 100644 --- a/rosette_api/MorphologyResponse.cs +++ b/rosette_api/MorphologyResponse.cs @@ -24,7 +24,7 @@ public class MorphologyResponse : RosetteResponse private const string responseHeadersKey = "responseHeaders"; /// - /// Gets or sets the output of the Rosette API's morphology endpoint, grouped by tokens in order of appearance + /// Gets or sets the output of the Analytics API's morphology endpoint, grouped by tokens in order of appearance /// [JsonProperty("items")] public List Items { get; set; } @@ -140,7 +140,7 @@ public override string ContentToString() } /// - /// A class for representing responses from the Morphology endpoint of the Rosette API + /// A class for representing responses from the Morphology endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class MorphologyItem diff --git a/rosette_api/NameDeduplicationResponse.cs b/rosette_api/NameDeduplicationResponse.cs index eb27b6d6..334e4682 100644 --- a/rosette_api/NameDeduplicationResponse.cs +++ b/rosette_api/NameDeduplicationResponse.cs @@ -6,7 +6,7 @@ namespace rosette_api { /// - /// A class to represent the results from the Name Deduplication endpoint of the Rosette API + /// A class to represent the results from the Name Deduplication endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class NameDeduplicationResponse : RosetteResponse { diff --git a/rosette_api/NameSimilarityResponse.cs b/rosette_api/NameSimilarityResponse.cs index 0e55339c..4728309b 100644 --- a/rosette_api/NameSimilarityResponse.cs +++ b/rosette_api/NameSimilarityResponse.cs @@ -6,7 +6,7 @@ namespace rosette_api { /// - /// A class to represent the results from the Name Similarity endpoint of the Rosette API + /// A class to represent the results from the Name Similarity endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class NameSimilarityResponse : RosetteResponse diff --git a/rosette_api/PingResponse.cs b/rosette_api/PingResponse.cs index a86bed3e..0473f4f9 100644 --- a/rosette_api/PingResponse.cs +++ b/rosette_api/PingResponse.cs @@ -9,7 +9,7 @@ namespace rosette_api { /// - /// A class to represent Rosette API responses when Ping() is called + /// A class to represent Analytics API responses when Ping() is called /// [JsonObject(MemberSerialization.OptOut)] public class PingResponse : RosetteResponse diff --git a/rosette_api/RecordSimilarityResponse.cs b/rosette_api/RecordSimilarityResponse.cs index d0b32da0..6a1d9cf9 100644 --- a/rosette_api/RecordSimilarityResponse.cs +++ b/rosette_api/RecordSimilarityResponse.cs @@ -9,7 +9,7 @@ namespace rosette_api { /// - /// A class to represent the results from the Record Similarity endpoint of the Rosette API + /// A class to represent the results from the Record Similarity endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class RecordSimilarityResponse : RosetteResponse { @@ -128,7 +128,7 @@ public override int GetHashCode() } /// - /// A class to represent the results from the Record Similarity endpoint of the Rosette API + /// A class to represent the results from the Record Similarity endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class RecordSimilarityResult { diff --git a/rosette_api/RelationshipsResponse.cs b/rosette_api/RelationshipsResponse.cs index 19f3f742..d1bf09bf 100644 --- a/rosette_api/RelationshipsResponse.cs +++ b/rosette_api/RelationshipsResponse.cs @@ -14,7 +14,7 @@ namespace rosette_api { /// - /// A class to represent responses from the Relationships endpoint of the Rosette API + /// A class to represent responses from the Relationships endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class RelationshipsResponse : RosetteResponse @@ -30,7 +30,7 @@ public class RelationshipsResponse : RosetteResponse internal const string MODALITIES = "modalities"; /// - /// Gets or sets the relationships extracted by the Rosette API + /// Gets or sets the relationships extracted by the Analytics API /// [JsonProperty(relationshipsKey)] public List Relationships { get; set; } @@ -65,7 +65,7 @@ public RelationshipsResponse(HttpResponseMessage apiResult) :base(apiResult) /// Creates a RelationshipsResponse from its components /// /// The relationships - /// The response headers returned from the Rosette API + /// The response headers returned from the Analytics API /// The content (the relationships) in dictionary form /// The content in JSON form public RelationshipsResponse(List relationships, Dictionary responseHeaders, Dictionary content, string contentAsJson) @@ -110,7 +110,7 @@ public override int GetHashCode() } /// - /// A class to represent a relationship as identified by the Rosette API + /// A class to represent a relationship as identified by the Analytics API /// [JsonConverter(typeof(RelationshipConverter))] [JsonObject(MemberSerialization=MemberSerialization.OptIn)] diff --git a/rosette_api/ResponseHeaders.cs b/rosette_api/ResponseHeaders.cs index 5c07d0bf..2aae6dd3 100644 --- a/rosette_api/ResponseHeaders.cs +++ b/rosette_api/ResponseHeaders.cs @@ -11,7 +11,7 @@ namespace rosette_api { /// - /// A class to represent the response headers returned by the Rosette API + /// A class to represent the response headers returned by the Analytics API /// [JsonObject(MemberSerialization.OptOut)] [JsonConverter(typeof(ResponseHeadersConverter))] @@ -30,7 +30,7 @@ public class ResponseHeaders internal const string connectionKey = "connection"; /// - /// The collection of all resposne headers returned by the Rosette API + /// The collection of all response headers returned by the Analytics API /// [JsonProperty("allResponseHeaders")] public IDictionary AllResponseHeaders; diff --git a/rosette_api/RosetteException.cs b/rosette_api/RosetteException.cs index b3bcc9b2..4f57cab3 100644 --- a/rosette_api/RosetteException.cs +++ b/rosette_api/RosetteException.cs @@ -3,14 +3,14 @@ namespace rosette_api { /// RosetteException Class /// - /// RosetteException: Custom exception to describe an exception from the Rosette API. + /// RosetteException: Custom exception to describe an exception from the Analytics API. /// /// [Serializable] public class RosetteException : Exception { /// RosetteException /// - /// RosetteException: Custom exception to describe an exception from the Rosette API. + /// RosetteException: Custom exception to describe an exception from the Analytics API. /// /// /// (string, optional): Message describing exception details diff --git a/rosette_api/RosetteExtensions.cs b/rosette_api/RosetteExtensions.cs index 8414df94..5a51749a 100644 --- a/rosette_api/RosetteExtensions.cs +++ b/rosette_api/RosetteExtensions.cs @@ -7,7 +7,7 @@ namespace rosette_api { /// - /// Extension classes specific to the Rosette binding + /// Extension classes specific to the Analytics binding /// public static class RosetteExtensions { /// diff --git a/rosette_api/RosetteResponse.cs b/rosette_api/RosetteResponse.cs index 4e098ade..4e3b1fbb 100755 --- a/rosette_api/RosetteResponse.cs +++ b/rosette_api/RosetteResponse.cs @@ -11,7 +11,7 @@ namespace rosette_api { /// - /// Encapsulates the response from RosetteAPI + /// Encapsulates the response from Analytics API /// [JsonObject(MemberSerialization=MemberSerialization.OptIn)] public class RosetteResponse { diff --git a/rosette_api/SentenceTaggingResponse.cs b/rosette_api/SentenceTaggingResponse.cs index 0ebe88cc..a3f956fb 100644 --- a/rosette_api/SentenceTaggingResponse.cs +++ b/rosette_api/SentenceTaggingResponse.cs @@ -11,7 +11,7 @@ namespace rosette_api { /// - /// A class to represent responses from the Sentence Tagging endpoint of the Rosette API + /// A class to represent responses from the Sentence Tagging endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class SentenceTaggingResponse : RosetteResponse @@ -19,7 +19,7 @@ public class SentenceTaggingResponse : RosetteResponse private const string sentencesKey ="sentences"; /// - /// Gets or sets the sentences identified by the Rosette API + /// Gets or sets the sentences identified by the Analytics API /// [JsonProperty(sentencesKey)] public List Sentences { get; set; } diff --git a/rosette_api/SentimentResponse.cs b/rosette_api/SentimentResponse.cs index d92402e7..78379d23 100644 --- a/rosette_api/SentimentResponse.cs +++ b/rosette_api/SentimentResponse.cs @@ -12,7 +12,7 @@ namespace rosette_api { /// - /// A class for representing responses from the sentiment analysis endpoint of the Rosette API + /// A class for representing responses from the sentiment analysis endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class SentimentResponse : RosetteResponse, IEquatable @@ -35,12 +35,12 @@ public class SentimentResponse : RosetteResponse, IEquatable internal const String permIdKey = "permId"; /// - /// Gets or sets the document-level sentiment identified by the Rosette API + /// Gets or sets the document-level sentiment identified by the Analytics API /// [JsonProperty(docKey)] public RosetteSentiment DocSentiment { get; set; } /// - /// Gets or sets the entities identified by the Rosette API with sentiment + /// Gets or sets the entities identified by the Analytics API with sentiment /// [JsonProperty(entitiesKey)] public List EntitySentiments { get; set; } @@ -264,7 +264,7 @@ public override string ToString() } /// - /// A class to represent an entity returned by the Sentiment Analysis endpoint of the Rosette API + /// A class to represent an entity returned by the Sentiment Analysis endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class RosetteSentimentEntity : RosetteEntity, IEquatable diff --git a/rosette_api/SyntaxDependenciesResponse.cs b/rosette_api/SyntaxDependenciesResponse.cs index 33630b00..03f56015 100644 --- a/rosette_api/SyntaxDependenciesResponse.cs +++ b/rosette_api/SyntaxDependenciesResponse.cs @@ -12,7 +12,7 @@ namespace rosette_api { /// - /// A class for representing responses from the syntax/dependencies endpoint of the Rosette API + /// A class for representing responses from the syntax/dependencies endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class SyntaxDependenciesResponse : RosetteResponse @@ -27,13 +27,13 @@ public class SyntaxDependenciesResponse : RosetteResponse internal const string DEPENDENT_TOKEN_INDEX = "dependentTokenIndex"; /// - /// Gets or sets the syntactic dependencies identified by the Rosette API + /// Gets or sets the syntactic dependencies identified by the Analytics API /// [JsonProperty(SENTENCES)] public List Sentences { get; set; } /// - /// Gets or sets the tokens identified by the Rosette API + /// Gets or sets the tokens identified by the Analytics API /// [JsonProperty(TOKENS)] public List Tokens { get; set; } @@ -119,7 +119,7 @@ public override int GetHashCode() } /// - /// A class to represent a SentenceWithDependencies returned by the Syntax Dependencies endpoint of the Rosette API + /// A class to represent a SentenceWithDependencies returned by the Syntax Dependencies endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class SentenceWithDependencies @@ -202,7 +202,7 @@ public override string ToString() } /// - /// A class to represent a dependency returned by the Syntax Dependencies endpoint of the Rosette API + /// A class to represent a dependency returned by the Syntax Dependencies endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class Dependency diff --git a/rosette_api/TokenizationResponse.cs b/rosette_api/TokenizationResponse.cs index 39e3332d..67047839 100644 --- a/rosette_api/TokenizationResponse.cs +++ b/rosette_api/TokenizationResponse.cs @@ -8,7 +8,7 @@ namespace rosette_api { /// - /// A class to represent responses from the Tokenization endpoint of the Rosette API + /// A class to represent responses from the Tokenization endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class TokenizationResponse : RosetteResponse diff --git a/rosette_api/TopicsResponse.cs b/rosette_api/TopicsResponse.cs index 9a03fc1f..d6900350 100644 --- a/rosette_api/TopicsResponse.cs +++ b/rosette_api/TopicsResponse.cs @@ -7,7 +7,7 @@ namespace rosette_api { /// - /// A class to represent responses from the Tokenization endpoint of the Rosette API + /// A class to represent responses from the Topics endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class TopicsResponse : RosetteResponse { diff --git a/rosette_api/TranslateNamesResponse.cs b/rosette_api/TranslateNamesResponse.cs index 0098e87a..006ad1c3 100644 --- a/rosette_api/TranslateNamesResponse.cs +++ b/rosette_api/TranslateNamesResponse.cs @@ -9,7 +9,7 @@ namespace rosette_api { /// - /// A class to represent responses from the TranslatedNames endpoint of the RosetteAPI + /// A class to represent responses from the TranslatedNames endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class TranslateNamesResponse : RosetteResponse diff --git a/rosette_api/TransliterationResponse.cs b/rosette_api/TransliterationResponse.cs index 89f20078..e86fb3ea 100644 --- a/rosette_api/TransliterationResponse.cs +++ b/rosette_api/TransliterationResponse.cs @@ -5,7 +5,7 @@ namespace rosette_api { /// - /// A class to represnt the results from the Name Deduplication endpoint of the Rosette API + /// A class to represent the results from the Transliteration endpoint of the Analytics API /// [JsonObject(MemberSerialization.OptOut)] public class TransliterationResponse : RosetteResponse { From 7ebbf956a70910eb37cdd2e6750b7ce275baa9a0 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 28 Oct 2024 13:05:30 +0100 Subject: [PATCH 09/15] WS-3270: update nuget desc --- rosette_api/rosette_api.nuspec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rosette_api/rosette_api.nuspec b/rosette_api/rosette_api.nuspec index af7f1378..40833f5f 100644 --- a/rosette_api/rosette_api.nuspec +++ b/rosette_api/rosette_api.nuspec @@ -1,10 +1,10 @@ - rosette_api 1.30.0 - .Net (C#) Binding for Rosette API + .Net (C#) Binding for Babel Street Analytics API + basistech Rosette by Babel Street Copyright 2014-2023 Basis Technology Corp. @@ -23,7 +23,6 @@ - From 4d62588ded0c944db667cf2ddc7f49d23a1c7a53 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 28 Oct 2024 13:06:50 +0100 Subject: [PATCH 10/15] WS-3270: update nuget copyright --- rosette_api/rosette_api.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rosette_api/rosette_api.nuspec b/rosette_api/rosette_api.nuspec index 40833f5f..fc2f7696 100644 --- a/rosette_api/rosette_api.nuspec +++ b/rosette_api/rosette_api.nuspec @@ -7,7 +7,7 @@ basistech Rosette by Babel Street - Copyright 2014-2023 Basis Technology Corp. + Copyright 2014-2024 Basis Technology Corp. https://www.babelstreet.com/rosette From 90eb101975542ef5191d79b3a28beb2d38d3a758 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 28 Oct 2024 16:45:25 +0100 Subject: [PATCH 11/15] WS-3270: update test URLs --- rosette_apiUnitTests/rosette_apiUnitTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rosette_apiUnitTests/rosette_apiUnitTests.cs b/rosette_apiUnitTests/rosette_apiUnitTests.cs index 367b2c69..ce6132fc 100755 --- a/rosette_apiUnitTests/rosette_apiUnitTests.cs +++ b/rosette_apiUnitTests/rosette_apiUnitTests.cs @@ -165,7 +165,7 @@ protected virtual void Dispose(bool disposing) { private MockHttpMessageHandler _mockHttp; private CAPI _rosetteApi; - private string _testUrl = @"https://api.rosette.com/rest/v1/"; + private string _testUrl = @"https://analytics.babelstreet.com/rest/v1/"; [OneTimeSetUp] public void Init() { @@ -428,7 +428,7 @@ private static byte[] Decompress(byte[] gzip) { private MockHttpMessageHandler _mockHttp; private CAPI _rosetteApi; - private string _testUrl = @"https://api.rosette.com/rest/v1/"; + private string _testUrl = @"https://analytics.babelstreet.com/rest/v1/"; private string _tmpFile = null; [OneTimeSetUp] From a2a446f08687fef143f68017eadb66f9e9662c59 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Tue, 29 Oct 2024 17:22:24 +0100 Subject: [PATCH 12/15] WS-3270: add all example runner script --- recompile.sh | 2 +- run_examples.sh | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 run_examples.sh diff --git a/recompile.sh b/recompile.sh index 60fd5b7c..dd3b41fc 100755 --- a/recompile.sh +++ b/recompile.sh @@ -23,7 +23,7 @@ do csc "${filename}.cs" /r:rosette_api.dll /r:System.Net.Http.dll /r:System.Web.Extensions.dll /r:Newtonsoft.Json.dll # if last command is empty then exit if [ $? -eq 0 ]; then - mono "${filename}.exe" + mono "${filename}.exe" $API_KEY $ALT_URL fi else echo "####> File ${filename}.cs not found in rosette_apiExamples directory" diff --git a/run_examples.sh b/run_examples.sh new file mode 100644 index 00000000..8eb03ddc --- /dev/null +++ b/run_examples.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +if [ $# -eq 0 ]; then + echo "Usage: $0 API_KEY [ALT_URL]" 1>&2 + exit 1 +fi + +filenames=$( ls rosette_apiExamples/*.cs | awk -F/ '{print $NF}' | awk -F. '{print $1}' ) + +export API_KEY=$1 +export ALT_URL=$2 + +bash recompile.sh $filenames \ No newline at end of file From 3b698be728674f872390a4751e4c9e649f78eb4e Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 4 Nov 2024 16:37:14 +0100 Subject: [PATCH 13/15] WS-3270: update headers --- rosette_api/CAPI.cs | 20 ++++++++++++++++---- rosette_api/ResponseHeaders.cs | 2 ++ rosette_apiUnitTests/rosette_apiUnitTests.cs | 15 ++++++++++++--- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/rosette_api/CAPI.cs b/rosette_api/CAPI.cs index 50439bd2..773fdb24 100644 --- a/rosette_api/CAPI.cs +++ b/rosette_api/CAPI.cs @@ -42,7 +42,8 @@ public enum MorphologyFeature /// public class CAPI { - private const string CONCURRENCY_HEADER = "X-RosetteAPI-Concurrency"; + private const string LEGACY_CONCURRENCY_HEADER = "X-RosetteAPI-Concurrency"; + private const string CONCURRENCY_HEADER = "X-BabelStreetAPI-Concurrency"; /// /// setupLock is used to ensure that the setup operation cannot be run @@ -160,7 +161,7 @@ public string UserAgent { get { - return string.Format("RosetteAPICsharp/{0}/{1}", Version, Environment.Version.ToString()); + return string.Format("Babel-Street-Analytics-API-Csharp/{0}/{1}", Version, Environment.Version.ToString()); } } /// MaxRetry @@ -308,9 +309,9 @@ public void ClearOptions() /// custom header value public void SetCustomHeaders(string key, string value) { - if (!key.StartsWith("X-RosetteAPI-")) + if (!key.StartsWith("X-RosetteAPI-") && !key.StartsWith("X-BabelStreetAPI-")) { - throw new RosetteException("Custom header name must begin with \"X-RosetteAPI-\""); + throw new RosetteException("Custom header name must begin with \"X-RosetteAPI-\" or \"X-BabelStreetAPI-\""); } if (_customHeaders.ContainsKey(key) && value == null) { @@ -1474,6 +1475,14 @@ private void CheckCallConcurrency(RosetteResponse response) Concurrency = allowedConnections; } } + else if (response.Headers.ContainsKey(LEGACY_CONCURRENCY_HEADER)) + { + int allowedConnections; + if (int.TryParse(response.Headers[LEGACY_CONCURRENCY_HEADER], out allowedConnections)) + { + Concurrency = allowedConnections; + } + } } /// Process @@ -1564,6 +1573,9 @@ private void SetupClient(bool forceReset = false) // Standard headers, which are required for Analytics API AddRequestHeader("X-BabelStreetAPI-Key", UserKey ?? "not-provided"); AddRequestHeader("User-Agent", UserAgent); + AddRequestHeader("X-BabelStreetAPI-Binding", "csharp"); + AddRequestHeader("X-BabelStreetAPI-Binding-Version", Version); + //todo remove in future release AddRequestHeader("X-RosetteAPI-Binding", "csharp"); AddRequestHeader("X-RosetteAPI-Binding-Version", Version); diff --git a/rosette_api/ResponseHeaders.cs b/rosette_api/ResponseHeaders.cs index 2aae6dd3..2ea123f9 100644 --- a/rosette_api/ResponseHeaders.cs +++ b/rosette_api/ResponseHeaders.cs @@ -23,7 +23,9 @@ public class ResponseHeaders internal const string serverKey = "server"; internal const string strictTransportSecurityKey = "strict-transport-security"; internal const string xRosetteAPIAppIDKey = "x-rosetteapi-app-id"; + internal const string xBabelStreetAPIAppIDKey = "x-babelstreetapi-app-id"; internal const string xRosetteAPIConcurrencyKey = "x-rosetteapi-concurrency"; + internal const string xBabelStreetAPIConcurrencyKey = "x-babelstreetapi-concurrency"; internal const string xRosetteAPIProcessedLanguageKey = "x-rosetteapi-processedlanguage"; internal const string xRosetteAPIRequestIDKey = "x-rosetteapi-request-id"; internal const string contentLengthKey = "content-length"; diff --git a/rosette_apiUnitTests/rosette_apiUnitTests.cs b/rosette_apiUnitTests/rosette_apiUnitTests.cs index ce6132fc..7cafeabd 100755 --- a/rosette_apiUnitTests/rosette_apiUnitTests.cs +++ b/rosette_apiUnitTests/rosette_apiUnitTests.cs @@ -462,7 +462,7 @@ public void Cleanup() { //------------------------- User-Agent Test ---------------------------------------- [Test] public void UserAgentTest() { - string uaString = string.Format("RosetteAPICsharp/{0}/{1}", CAPI.Version, Environment.Version.ToString()); + string uaString = string.Format("Babel-Street-Analytics-API-Csharp/{0}/{1}", CAPI.Version, Environment.Version.ToString()); Assert.AreEqual(uaString, _rosetteApi.UserAgent); } @@ -494,7 +494,7 @@ public void ClearOptionsTest() { [Test] - public void CustomHeadersTest() { + public void CustomHeadersTestRosette() { KeyValuePair expected = new KeyValuePair("X-RosetteAPI-Test", "testValue"); _rosetteApi.SetCustomHeaders(expected.Key, expected.Value); @@ -502,6 +502,15 @@ public void CustomHeadersTest() { Assert.AreEqual(expected.Value, _rosetteApi.GetCustomHeaders()[expected.Key]); } + [Test] + public void CustomHeadersTestBabelStreet() { + KeyValuePair expected = new KeyValuePair("X-BabelStreetAPI-Test", "testValue"); + + _rosetteApi.SetCustomHeaders(expected.Key, expected.Value); + + Assert.AreEqual(expected.Value, _rosetteApi.GetCustomHeaders()[expected.Key]); + } + [Test] public void ClearHeadersTest() { _rosetteApi.SetCustomHeaders("X-RosetteAPI-Test", "testValue"); @@ -519,7 +528,7 @@ public void CheckInvalidCustomHeader() { _rosetteApi.SetCustomHeaders(expected.Key, expected.Value); } catch (RosetteException ex) { - Assert.AreEqual(ex.Message, "Custom header name must begin with \"X-RosetteAPI-\""); + Assert.AreEqual(ex.Message, "Custom header name must begin with \"X-RosetteAPI-\" or \"X-BabelStreetAPI-\""); return; } } From 2a182a347ce6c34c630b84153d50fce7af1bf4c4 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 20 Nov 2024 15:50:55 -0600 Subject: [PATCH 14/15] WS-3314: A few small tweaks. --- rosette_api/CAPI.cs | 2 +- rosette_api/rosette_api.nuspec | 2 +- rosette_apiExamples/language.cs | 2 +- rosette_apiExamples/language_multilingual.cs | 2 +- run_examples.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) mode change 100644 => 100755 run_examples.sh diff --git a/rosette_api/CAPI.cs b/rosette_api/CAPI.cs index 773fdb24..51ee81ff 100644 --- a/rosette_api/CAPI.cs +++ b/rosette_api/CAPI.cs @@ -98,7 +98,7 @@ public class CAPI private int _concurrentConnections = 1; /// C# API class - /// Babel Street Analytics Python Client Binding API; representation of an Analytics server. + /// Babel Street Analytics Client Binding API; representation of an Analytics server. /// Instance methods of the C# API provide communication with specific Analytics server endpoints. /// Requires user_key to start and has 3 additional parameters to be specified. /// Will run a Version Check against the Analytics Server. If the version check fails, a diff --git a/rosette_api/rosette_api.nuspec b/rosette_api/rosette_api.nuspec index fc2f7696..1c377a4c 100644 --- a/rosette_api/rosette_api.nuspec +++ b/rosette_api/rosette_api.nuspec @@ -14,7 +14,7 @@ https://github.com/rosette-api/csharp/wiki/Release-Notes Apache-2.0 false - RosetteAPI address similarity analyze language babel street categories coreference entity extraction entity linking event extraction fuzzy matching language identification lemmatization match identity morphology name deduplication name similarity name translation ner nlp parts of speech record similarity relationships rosette semantic similarity semantic vectors sentiment analysis text analytics text embeddings tokenization + address similarity analyze language babel street categories coreference entity extraction entity linking event extraction fuzzy matching language identification lemmatization match identity morphology name deduplication name similarity name translation ner nlp parts of speech record similarity relationships rosette semantic similarity semantic vectors sentiment analysis text analytics text embeddings tokenization diff --git a/rosette_apiExamples/language.cs b/rosette_apiExamples/language.cs index 7feb0757..f07e623c 100644 --- a/rosette_apiExamples/language.cs +++ b/rosette_apiExamples/language.cs @@ -32,8 +32,8 @@ static void Main(string[] args) { CAPI LanguageCAPI = string.IsNullOrEmpty(alturl) ? new CAPI(apikey) : new CAPI(apikey, alturl); string language_data = @"Por favor Señorita, says the man."; + LanguageCAPI.SetCustomHeaders("X-BabelStreetAPI-App", "csharp-examples"); //The results of the API call will come back in the form of a Dictionary - LanguageCAPI.SetCustomHeaders("X-RosetteAPI-App", "csharp-app"); LanguageIdentificationResponse response = LanguageCAPI.Language(language_data); foreach (KeyValuePair h in response.Headers) { Console.WriteLine(string.Format("{0}:{1}", h.Key, h.Value)); diff --git a/rosette_apiExamples/language_multilingual.cs b/rosette_apiExamples/language_multilingual.cs index 9270b2b2..26a7a836 100644 --- a/rosette_apiExamples/language_multilingual.cs +++ b/rosette_apiExamples/language_multilingual.cs @@ -33,7 +33,7 @@ static void Main(string[] args) CAPI LanguageCAPI = string.IsNullOrEmpty(alturl) ? new CAPI(apikey) : new CAPI(apikey, alturl); string language_multilingual_data = @"On Thursday, as protesters gathered in Washington D.C., the United States Federal Communications Commission under Chairman Ajit Pai voted 3-2 to overturn a 2015 decision, commonly called Net Neutrality, that forbade Internet service providers (ISPs) such as Verizon, Comcast, and AT&T from blocking individual websites or charging websites or customers more for faster load times. Quatre femmes ont été nommées au Conseil de rédaction de la loi du Qatar. Jeudi, le décret royal du Qatar a annoncé que 28 nouveaux membres ont été nommés pour le Conseil de la Choura du pays. ذكرت مصادر أمنية يونانية، أن 9 موقوفين من منظمة ""د هـ ك ب ج"" الذين كانت قد أوقفتهم الشرطة اليونانية في وقت سابق كانوا يخططون لاغتيال الرئيس التركي رجب طيب أردوغان."; - LanguageCAPI.SetCustomHeaders("X-RosetteAPI-App", "csharp-app"); + LanguageCAPI.SetCustomHeaders("X-BabelStreetAPI-App", "csharp-examples"); LanguageCAPI.SetOption("multilingual", "true"); //The results of the API call will come back in the form of a Dictionary diff --git a/run_examples.sh b/run_examples.sh old mode 100644 new mode 100755 index 8eb03ddc..754a5e1b --- a/run_examples.sh +++ b/run_examples.sh @@ -10,4 +10,4 @@ filenames=$( ls rosette_apiExamples/*.cs | awk -F/ '{print $NF}' | awk -F. '{pri export API_KEY=$1 export ALT_URL=$2 -bash recompile.sh $filenames \ No newline at end of file +bash recompile.sh $filenames From a07aead13f504c5dc18d0ff5c636ce59b1633a61 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 22 Nov 2024 21:52:43 +0000 Subject: [PATCH 15/15] Version 1.31.0 --- rosette_api/Properties/AssemblyInfo.cs | 6 +++--- rosette_api/rosette_api.nuspec | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rosette_api/Properties/AssemblyInfo.cs b/rosette_api/Properties/AssemblyInfo.cs index 72c5b0a6..8d4f6375 100644 --- a/rosette_api/Properties/AssemblyInfo.cs +++ b/rosette_api/Properties/AssemblyInfo.cs @@ -31,6 +31,6 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("1.30.0.0")] -[assembly: AssemblyVersion("1.30.0.0")] -[assembly: AssemblyFileVersion("1.30.0.0")] +// [assembly: AssemblyVersion("1.31.0.0")] +[assembly: AssemblyVersion("1.31.0.0")] +[assembly: AssemblyFileVersion("1.31.0.0")] diff --git a/rosette_api/rosette_api.nuspec b/rosette_api/rosette_api.nuspec index 1c377a4c..d56fa803 100644 --- a/rosette_api/rosette_api.nuspec +++ b/rosette_api/rosette_api.nuspec @@ -2,7 +2,7 @@ rosette_api - 1.30.0 + 1.31.0 .Net (C#) Binding for Babel Street Analytics API basistech