microsoft / Recognizers-Text

Microsoft.Recognizers.Text provides recognition and resolution of numbers, units, date/time, etc. in multiple languages (ZH, EN, FR, ES, PT, DE, IT, TR, HI, NL. Partial support for JA, KO, AR, SV). Packages available at: https://www.nuget.org/profiles/Recognizers.Text, https://www.npmjs.com/~recognizers.text
MIT License
1.66k stars 429 forks source link

C/C++ Native Implementation? #3136

Open jefgen opened 1 year ago

jefgen commented 1 year ago

The really nice Microsoft.Recognizers.Text library has 4 main platforms that it currently targets:

I was wondering, has there ever been any interest or desire to support a native implementation in C/C++?

We'd like to use the Microsoft.Recognizers.Text library, but can only build with C/C++ and don't have access to C#/.NET, which would likely be the closest option.

Is your feature request related to a problem? Please describe. This is a feature request. We'd like to use the Microsoft.Recognizers.Text library, but we would need a native implementation.

Describe the solution you'd like An officially supported port of the library to C++. :)

Describe alternatives you've considered Using .NET Native is a potential option for avoiding the dependency on the .NET framework. However, this technology is only for UWP applications.

jefgen commented 1 year ago

FWIW, it looks like this question came up ~2 years ago, and the suggestion at the time was to try and use the .NET version.

https://github.com/microsoft/Recognizers-Text/discussions/2725

I'm wondering if there has been any other developments, or ideas on a native implementation, since then.

aurghob commented 1 year ago

Hi,

Unfortunately for this thread, The suggestion remains the same : to use the .NET version for now. There have been no updates regarding a C++ library and there are no plans for the immediate future to have a C++ library for now.

We are open to others contributing to a C++ library if needed. We're actively working on the .NET version of the library as and when needed at the moment.

chschrae commented 11 months ago

@jefgen there is a very minimized subset of this in C++ that was built into the Speech SDK as part of the intent pattern matcher. That could be included in a C++ project. Here is the documentation: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/pattern-matching-overview

jefgen commented 11 months ago

Thank you for the reply!

Just to make sure I understand, are you saying that it was the "pattern matcher" functionality that was ported to C++ as part of the Speech SDK?

Taking a quick look at the docs, it sort of looks like the pattern matcher is similar to the ICU MessageFormat functionality.

chschrae commented 11 months ago

There is a "Pattern Matcher" used for intent recognition built-in to the Speech SDK that has some integer support based on the work in this repo. If that is all you need, then that could help. It is a VERY limited subset of this repo and some other changes were made along concatenating numbers as well to better support the intended patterns. I would guess that it is probably not what you are looking for, but I figured I might as well mention it in case it was helpful.

I'm not familiar with the ICU MessageFormat. It is a totally separate codebase.

jefgen commented 11 months ago

Thanks for the reply. In our case we are primarily interested in the Date/Time parsing of user input(s), and also the handling of different languages for the inputs too. The intent recognition does look interesting, but right now I don't think any of the scenarios being considered would require it. But things might change in the future. :)