accord-net / framework

Machine learning, computer vision, statistics and general scientific computing for .NET
http://accord-framework.net
GNU Lesser General Public License v2.1
4.48k stars 1.99k forks source link

Accord.text has duplicate Accord.MachineLearning.Tools class #1073

Open iRonJ opened 6 years ago

iRonJ commented 6 years ago

What would you like to submit? (put an 'x' inside the bracket that applies)

Issue description

When adding a reference to both Accord.MachineLearning and Accord.Text it's impossible to use the "string".Tokenize() method since the correct .Tokenize() can't be specified.

Proposed solution would be to remove the Tools from Accord.Text

cesarsouza commented 6 years ago

Thanks @iRonJ, that's a good catch. The Tools class in Accord.Text was being included in the wrong namespace - it should have been included in Accord.Text, and not Accord.MachineLearning.

Thanks again, Cesar

cesarsouza commented 6 years ago

I've just moved the "Tokenize" extension methods to a static ExtensionMethods class inside Accord.Text. This way, those methods should become accessible whenever you import Accord.Text in your source file. If you would like to share a suggestion about where those methods should go, please let me know!

Regards, Cesar

iRonJ commented 6 years ago

I think this is fine for now. It creates a good framework for future additions to this while avoiding further namespace collision issues (I couldn't get the Nuget version to install this correctly for example).

iSatishYadav commented 6 years ago

Still facing this issue in 3.8.2-alpha.

ToAruShiroiNeko commented 4 years ago

Still an issue in stable 3.8.0, this makes machine learning algorithms that utilize Tokenize() unusable.