sergey-tihon / Stanford.NLP.NET

Stanford NLP for .NET
http://sergey-tihon.github.io/Stanford.NLP.NET/
MIT License
598 stars 123 forks source link

Plans to add .NET Core support? #45

Closed atrauzzi closed 2 years ago

atrauzzi commented 8 years ago

As seen here: https://dotnet.github.io/

sergey-tihon commented 8 years ago

It is question to @jfrijters everything depend on plans to port IKVM.NET https://sourceforge.net/projects/ikvm/

SleepyDeb commented 7 years ago

I'll try to make a try in this repo: https://github.com/SleepyDeb/JSharp

flaksirus commented 7 years ago

So, IKVM.net died today... Does it mean that project wouldn't be able for dotnet core at least in the near future?

SleepyDeb commented 7 years ago

IKVM has already a full supporto of java 8 runtime, java 9 will be not supported by Jeroen Frijters, maybe will be developed by others developers

Stanwar commented 6 years ago

Hello, I am attempting to perform NER on a dotnet core project. But I am getting an exception( Method not found). Could this be attributed to lack of support for dotnet core? I have the latest packages installed and my java version is java 9.0.4.

Much Thanks.

sergey-tihon commented 6 years ago

@Stanwar sorry, nobody triednetcore yet.

Could you please try to run CoreNLP as a server on your java machine and just communicate with the server using client - here is the how to

Stanwar commented 6 years ago

Thanks a lot @sergey-tihon I will try this out. I was able to run coreNLP on .NET without any issues but I will continue to try it on dotnet core.

msamara commented 5 years ago

@Stanwar sorry, nobody triednetcore yet.

Could you please try to run CoreNLP as a server on your java machine and just communicate with the server using client - here is the how to

Any idea if there is an update or at least a plan to update this? I do understand dependency of IKVM is vital here, but did anyone try a different approach? i.e minimise dependency by running CoreNLP as a server.

Latest I tried was running CoreNLP as a server on .NET Core 2.2.5 but still getting the usual MissingMethodException exception

MissingMethodException: Method not found: 'Void System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.Security.AccessControl.FileSystemRights, System.IO.FileShare, Int32, System.IO.FileOptions)'.

sergey-tihon commented 5 years ago

The most realistic future is .NET 5 with

Java interoperability will be available on all platforms.

As of today, the most robust approach is to use CoreNLP Server and run it separately on JVM or as Docker container

SleepyDeb commented 5 years ago

Hey guys, im really near to release a net core version of ikvm :D!

StachuDotNet commented 5 years ago

@SleepyDeb how's it going? :)

SHABIR0786 commented 5 years ago

@SleepyDeb Have you released the net core version of ikvm.

cosentino-smeup commented 5 years ago

Same here .. any news on net core version of ikvm?

sergey-tihon commented 5 years ago

Not sure if we really need it... I hope .NET 5 (Java interoperability will be available on all platforms.) will simplify usage of Java packages.

IKVM details are here https://github.com/sergey-tihon/OpenNLP.NET/issues/5#issuecomment-546685482

cosentino-smeup commented 5 years ago

Thank you very much, ams-tschoeninghttps://github.com/ams-tschoening commented on Sep 13https://github.com/wwrd/ikvm8/issues/3#issuecomment-531309359

He published a working version dotnet core compatible!!

From: Sergey Tihon notifications@github.com Sent: Wednesday 30 October 2019 09:29 To: sergey-tihon/Stanford.NLP.NET Stanford.NLP.NET@noreply.github.com Cc: Antonio Cosentino antonio.cosentino@smeup.com; Comment comment@noreply.github.com Subject: Re: [sergey-tihon/Stanford.NLP.NET] Plans to add .NET Core support? (#45)

Not sure if we really need it... I hope .NET 5 (Java interoperability will be available on all platforms.) will simplify usage of Java packages.

IKVM details are here sergey-tihon/OpenNLP.NET#5 (comment)https://github.com/sergey-tihon/OpenNLP.NET/issues/5#issuecomment-546685482

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/sergey-tihon/Stanford.NLP.NET/issues/45?email_source=notifications&email_token=AH2QVUHWRVZK5CHTJ3Q7YJTQRFHVBA5CNFSM4CCY2F3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECTPGEA#issuecomment-547812112, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AH2QVUED7MBMFPU33E3EKWLQRFHVBANCNFSM4CCY2F3A.

erksch commented 4 years ago

.NET Core support was merged into ikvm-revived/ikvm! Would it be possible to use this IKVM version as a dependency to enable .NET Core support?

danasagi commented 3 years ago

How can I use this new version?

sergey-tihon commented 3 years ago

@danasagi there is no IKVM for .net core and there no Stanford.NLP.NET for .net core

danasagi commented 3 years ago

So the mentioned above (the branch that was merged to master with the new ctor) is not relevant? @sergey-tihon

sergey-tihon commented 3 years ago

I see the repo with last commit (25 May 2020) and no NuGet package released. So yes, it is irrelevant now.

GeorgeS2019 commented 2 years ago

@sergey-tihon

IKVM-8.2.0 now supports .NET Core/.NET 5+

https://github.com/sergey-tihon/Stanford.NLP.NET/discussions/119 https://www.reddit.com/r/dotnet/comments/vqqpqb/ikvm_820/

image

agonzalezm commented 2 years ago

@sergey-tihon now that IKVM 8.2 support net core/NET 5+ when can we expect a new version of stanford.nlp.net with support for this? are there any big changes there?

GeorgeS2019 commented 2 years ago

@agonzalezm https://github.com/ikvm-revived/ikvm-maven/issues/8

This provide instruction to generate .NET Core IKVM dll based on maven repository

    <groupId>edu.stanford.nlp</groupId>
    <artifactId>stanford-corenlp</artifactId>
    <version>4.4.0</version>

https://mvnrepository.com/artifact/edu.stanford.nlp

GeorgeS2019 commented 2 years ago

@atrauzzi Please close this issue :-)

sergey-tihon commented 2 years ago

@agonzalezm do not expect it soon.

We did attempt to port simpler and smaller library (Open.NLP) and it even exist on NuGet. We did it with IKVM 8.2.0-prerelease.392 -https://github.com/sergey-tihon/OpenNLP.NET/pull/14, but latest (aka stable/released version of IKVM does not work for me at all, like here https://github.com/sergey-tihon/OpenNLP.NET/pull/16

If you need it now, please try new <MavenReference> or <IkvmReference> and try to transpile jar as part of your build process.

https://mvnrepository.com/artifact/edu.stanford.nlp

@GeorgeS2019 do you have working sample of MavenReference + https://mvnrepository.com/artifact/edu.stanford.nlp ?

GeorgeS2019 commented 2 years ago

@sergey-tihon
The ikvm maven, if you read the issues, not yet free of issues. I tried other maven library, One need to do the test of the created dll.

You have far more experience. It is not trivial what you have done to support us. Thanks for sharing with us the challenges you have faced.

Let us help each other to get there.

GeorgeS2019 commented 2 years ago

Potentially, it could be a TDD way to test the created dll. In this way, it will be easier for the community to keep up with the latest (e.g. nightly) developments.

wasabii commented 2 years ago

@sergey-tihon I'm the guy doing most of the new IKVM development. I stumbled across this because @GeorgeS2019 opened a bug on the IKVM side for something.

We did it with IKVM 8.2.0-prerelease.392 -https://github.com/sergey-tihon/OpenNLP.NET/pull/14, but latest (aka stable/released version of IKVM does not work for me at all, like here https://github.com/sergey-tihon/OpenNLP.NET/pull/16

If that build is to be believed, it looks like a simple matter of not specifying the appropriate -reference arguments to the command. These are required when doing .NET Core, since there's no stable way of determining them programmatically. csc.exe suffers from the same issue.

wasabii commented 2 years ago

@GeorgeS2019 You say there is some IKVM.Maven.Sdk bug regarding this? Can you point that out. I am not tracking any breaking bugs in IKVM.Maven.Sdk. Just a handful of situations where people aren't exactly understanding how Maven works (underspecified optional dependencies) and some recurring problem with Apache Tika's class loading.

But nothing that should prevent OpenNLP from working, if used properly.

GeorgeS2019 commented 2 years ago

Everything is .NET6

Using this project configuration image

Get these Stanford-CoreNLP dlls: image

Did a VERY quick and dirty check of the provided StanfordNLP.CoreNLP.Tests

image

image

wasabii commented 2 years ago

Yeah.... So what's the error? And can you put it on the IKVM-maven repo?

GeorgeS2019 commented 2 years ago

To get these tests right, the directory of the models and test data must be in the right place and it is unclear whether I have included all the DLL generated. Ideally, all generated Dlls are put in a separate folder. (As I said this is quick and dirty)

The aim is to show that your ikvm (.NET6) is working, we need to investigate further.

wasabii commented 2 years ago

There is no need to do anything with generated DLLs. You simply add maven reference and you're done. That's the goal.

GeorgeS2019 commented 2 years ago

There is no need to do anything with generated DLLs. You simply add maven reference and you're done. That's the goal.

Good to know

GeorgeS2019 commented 2 years ago

PoC OpenNLP using MavenReference

  <ItemGroup>
    <MavenReference Include="opennlp-tools" Version="1.9.1" GroupID ="org.apache.opennlp" />
    <MavenReference Include="opennlp-uima" Version="1.9.1" GroupID ="org.apache.opennlp" />
    <MavenReference Include="opennlp-morfologik-addon" Version="1.9.1" GroupID ="org.apache.opennlp" />
    <MavenReference Include="opennlp-brat-annotator" Version="1.9.1" GroupID ="org.apache.opennlp" />
  </ItemGroup>

There are 3 stages to getting this to work:

  1. Resolve/download Maven Dependencies to obj/jar/ directory
  2. Execute ikvmc on the items in obj/jar/ for each target framework
  3. Self-copying the .targets file and <MavenReference>s recursively to each project that depends on us during dotnet pack
wasabii commented 2 years ago

That repository is two months old and has no relationship to the released version.

GeorgeS2019 commented 2 years ago

@wasabii The biggest challenge for new adopters to the new possibilities offered by you and your contributors are the ASSUMPTIONS that the new adopters could follow your latest thinking.

IKVM has existed for many many years. However, now we have Ikvm.Maver and Ikvm.SDK.

Many need time to figure out how to catch up.

Leaving all attempts (especially PoC, although 2 to more months old) is critical to catching up with the new visions.

wasabii commented 2 years ago

I don't exactly know what you're saying. You are grabbing a private repository hosted by NightOwl that he hasn't updated in two months.

IKVM.Maven.Sdk is located at https://github.com/ikvm-revived/ikvm-maven, on the official IKVM organization. Said page has a fairly detailed README right on the front. And the package is published in NuGet with an official name.

It can't get any more clear than that I don't think.

GeorgeS2019 commented 2 years ago

@wasabii

You are doing a great job. However, I am in the business of effective communication

Said page has a fairly detailed README

Not everyone works the same way you write. You have done a great job. Now, let the community helps each other to catch up your speed.

GeorgeS2019 commented 2 years ago

That repository is two months old and has no relationship to the released version. @wasabii

I apologize, you are right, the two months old may not reflect a better result with the latest Ikvm-revived commit

GeorgeS2019 commented 2 years ago

@sergey-tihon Thanks for making the .NET Co works. I built, mainly build Test part fails image

GeorgeS2019 commented 2 years ago

The UNPACKING did not work for TWO folders

wasabii commented 2 years ago

That repository is two months old and has no relationship to the released version.

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: GeorgeS2019 @.> Sent: Sunday, August 21, 2022 12:20:05 PM To: sergey-tihon/Stanford.NLP.NET @.> Cc: Jerome Haltom @.>; Comment @.> Subject: Re: [sergey-tihon/Stanford.NLP.NET] Plans to add .NET Core support? (#45)

PoC OpenNLPhttps://github.com/NightOwl888/MavenReferencePoC/blob/main/src/MavenExample/MavenExample.csproj using MavenReference

— Reply to this email directly, view it on GitHubhttps://github.com/sergey-tihon/Stanford.NLP.NET/issues/45#issuecomment-1221586845, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAEGGSU5467QSQEQA5RZL3DV2JQMLANCNFSM4CCY2F3A. You are receiving this because you commented.Message ID: @.***>