{"id":13791115,"url":"https://github.com/rosette-api/csharp","last_synced_at":"2025-05-02T22:32:00.940Z","repository":{"id":36365414,"uuid":"40670231","full_name":"rosette-api/csharp","owner":"rosette-api","description":"Babel Street Analytics Client Library for C#","archived":false,"fork":false,"pushed_at":"2025-04-04T10:17:29.000Z","size":13230,"stargazers_count":6,"open_issues_count":4,"forks_count":16,"subscribers_count":21,"default_branch":"develop","last_synced_at":"2025-04-04T11:26:13.176Z","etag":null,"topics":["capi","csharp","entity-extraction","language-identification","machine-learning","morphology","name-translation","natural-language-processing","nlp","nuget","rosette","text-analysis","text-analytics","text-embedding","visual-studio"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rosette-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-08-13T16:41:58.000Z","updated_at":"2025-04-04T10:17:14.000Z","dependencies_parsed_at":"2023-12-05T10:29:42.065Z","dependency_job_id":"66174332-6ab0-489f-82b4-59fb788385ee","html_url":"https://github.com/rosette-api/csharp","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosette-api%2Fcsharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosette-api%2Fcsharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosette-api%2Fcsharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosette-api%2Fcsharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rosette-api","download_url":"https://codeload.github.com/rosette-api/csharp/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252116426,"owners_count":21697375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capi","csharp","entity-extraction","language-identification","machine-learning","morphology","name-translation","natural-language-processing","nlp","nuget","rosette","text-analysis","text-analytics","text-embedding","visual-studio"],"created_at":"2024-08-03T22:00:55.960Z","updated_at":"2025-05-02T22:32:00.933Z","avatar_url":"https://github.com/rosette-api.png","language":"C#","readme":"\u003ca href=\"https://www.babelstreet.com/rosette\"\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://charts.babelstreet.com/icon-dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://charts.babelstreet.com/icon-light.png\"\u003e\n  \u003cimg alt=\"Babel Street Logo\" width=\"48\" height=\"48\"\u003e\n\u003c/picture\u003e\n\u003c/a\u003e\n\n# Analytics by Babel Street\n\n---\n\n[![NuGet version](https://badge.fury.io/nu/rosette_api.svg)](https://badge.fury.io/nu/rosette_api)\n\nOur product is a full text processing pipeline from data preparation to extracting the most relevant information and\nanalysis utilizing precise, focused AI that has built-in human understanding. Text Analytics provides foundational\nlinguistic analysis for identifying languages and relating words. The result is enriched and normalized text for\nhigh-speed search and processing without translation.\n\nText Analytics extracts events and entities — people, organizations, and places — from unstructured text and adds the\nstructure of associating those entities into events that deliver only the necessary information for near real-time\ndecision making. Accompanying tools shorten the process of training AI models to recognize domain-specific events.\n\nThe product delivers a multitude of ways to sharpen and expand search results. Semantic similarity expands search\nbeyond keywords to words with the same meaning, even in other languages. Sentiment analysis and topic extraction help\nfilter results to what’s relevant.\n\n## Analytics API Access\n- Analytics Cloud [Sign Up](https://developer.babelstreet.com/signup)\n\n## Quick Start\n\n#### Installation\nIf you use Nuget, you may use either Visual Studio's Nuget package manager or command line to install the Analytics API binding.\n\nIn Visual Studio: search for the [rosette_api package](https://www.nuget.org/packages/rosette_api/) in Nuget and follow the installation instructions.\n\nUsing Nuget Command Line: `nuget install rosette_api`.\n\nTo check your installed version:\n\n`nuget list rosette_api`\n\n#### Examples\nView small example programs for each Rosette endpoint\nin the [examples](https://github.com/rosette-api/csharp/tree/develop/rosette_apiExamples) directory.\n\n#### Documentation \u0026 Support\n- [Binding API](https://rosette-api.github.io/csharp/)\n- [Analytics Platform API](https://docs.babelstreet.com/API/en/index-en.html)\n- [Binding Release Notes](https://github.com/rosette-api/csharp/wiki/Release-Notes)\n- [Analytics Platform Release Notes](https://docs.babelstreet.com/Release/en/rosette-cloud.html)\n- [Support](https://babelstreet.my.site.com/support/s/)\n- [Binding License: Apache 2.0](https://github.com/rosette-api/csharp/blob/develop/LICENSE.txt)\n\n## Concurrency\nThe C# binding uses HttpClient to manage connectivity and concurrency.  By default, .NET sets the default connection \nlimit to 2, which is the same as the Analytics API default limit.  For Analytics API plans that allow for higher \nconcurrency, the internal HTTP client will adjust automatically to the higher number.  If a user chooses to provide \ntheir own HTTP client, no adjustment will be made.  In this case it is up to the user to set \n`ServicePointManager.DefaultConnectionLimit` to the Analytics API concurrency level prior to instantiating the CAPI object.\n\nFor multithreaded operations, do not instantiate a new CAPI object for each thread.  The objects will not share the \nconnection limit and `429 too many requests` errors are likely to occur. Rather, so that the underlying HttpClient can \nmanage the queueing of the requests across all threads, instantiate a CAPI object and pass it to each thread.  If it is \nnecessary to instantiate a CAPI object on each thread, first create an HttpClient object, either by retrieving it from \nan 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.\n\n#### Example of using a common CAPI object for each thread:\n```\n    static void Main(string[] args) {\n        TestConcurrency().GetAwaiter().GetResult();\n    }\n\n    private static async Task TestConcurrency() {\n        int threads = 5;\n        var tasks = new List\u003cTask\u003e();\n        CAPI api = new CAPI(\"rosette api key\");\n        foreach (int task in Enumerable.Range(0, threads)) {\n            Console.WriteLine(\"Starting task {0}\", task);\n            tasks.Add(Task.Factory.StartNew( () =\u003e runLookup(task, api) ));\n        }\n        await Task.WhenAll(tasks);\n        Console.WriteLine(\"Test complete\");\n    }\n\n    private static Task runLookup(int taskId, CAPI api) {\n        int calls = 5;\n        string contentUri = \"http://www.foxsports.com/olympics/story/chad-le-clos-showed-why-you-never-talk-trash-to-michael-phelps-080916\";\n        for (int i = 0; i \u003c calls; i++) {\n            Console.WriteLine(\"Task ID: {0} call {1}\", taskId, i);\n            try {\n                var result = api.Entity(contentUri: contentUri);\n                Console.WriteLine(\"Concurrency: {0}, Result: {1}\", api.Concurrency, result);\n            }\n            catch (Exception ex) {\n                Console.WriteLine(ex);\n            }\n        }\n        return Task.CompletedTask;\n    }\n```\n\n#### Example of retrieving a client object and using it in each thread:\n```\n    static void Main(string[] args) {\n        TestConcurrency().GetAwaiter().GetResult();\n    }\n\n    private static async Task TestConcurrency() {\n        int threads = 5;\n        var tasks = new List\u003cTask\u003e();\n\n        CAPI api = new CAPI(\"rosette api key\");\n        HttpClient client = api.Client;\n        foreach (int task in Enumerable.Range(0, threads)) {\n            Console.WriteLine(\"Starting task {0}\", task);\n            tasks.Add(Task.Factory.StartNew( () =\u003e runLookup(task, client) ));\n        }\n        await Task.WhenAll(tasks);\n        Console.WriteLine(\"Test complete\");\n    }\n\n    private static Task runLookup(int taskId, HttpClient client) {\n        int calls = 5;\n        string contentUri = \"http://www.foxsports.com/olympics/story/chad-le-clos-showed-why-you-never-talk-trash-to-michael-phelps-080916\";\n        for (int i = 0; i \u003c calls; i++) {\n            Console.WriteLine(\"Task ID: {0} call {1}\", taskId, i);\n            try {\n                CAPI api = new CAPI(\"rosette api key\", client: client);\n\n                var result = api.Entity(contentUri: contentUri);\n                Console.WriteLine(\"Concurrency: {0}, Result: {1}\", api.Concurrency, result);\n            }\n            catch (Exception ex) {\n                Console.WriteLine(ex);\n            }\n        }\n        return Task.CompletedTask;\n    }\n```\n\n\n\n\n## Binding Developer Information\nIf you are modifying the binding code, please refer to the [developer README](https://github.com/rosette-api/csharp/tree/develop/DEVELOPER.md) file.\n","funding_links":[],"categories":["Bindings"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosette-api%2Fcsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frosette-api%2Fcsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosette-api%2Fcsharp/lists"}