Recently used to consider the word participle for a long time, the use of stuttering participle, the reason see blog lucene.net (4.8.0) Learning problems record five: Jieba participle and lucene combination, and the thinking of the word breaker
Now that you've chosen, it's hard to get started.
Check out the. NET core version of the Jieba participle has now been migrated
- Https://github.com/linezero/jieba.NET is just the NET core 1.1 version, see there are issue and no one processing, it feels as if the author does not maintain.
- Https://github.com/SilentCC/JIEba-netcore2.0, this is the fork above and then upgrade yourself to. NET Core 2.0 and Lucene combined. Since I didn't use Lucene, it didn't work for me very much.
It took a long time to finally decide to fork the first one, and then simply upgrade yourself to. NET Core 2.0.
The actual upgrade process is not difficult. It was soon upgraded. Address: Https://github.com/1483523635/jieba.NetCore
When ready to use, found no nuget packages available, even 1.1 of nuget packages are not. I was completely desperate.
No NuGet packages developed under. NET Core? Let me refer to the DLL in my project? The egg hurts.
The process of releasing NuGet for the first time was opened.
- Register an account
2. Create an API key and save it
Open the solution to see a total of three items: Analyser (class library), jieba.net (console output), Segmenter (class library).
Since the Segmenter project does not refer to other projects, it is ready to release this nuget first
First, download the Nuget.exe, download the corresponding version according to your needs, and then add the path where the Nuget.exe is located to the environment variable.
Then the command line enters the project
nuget setApiKey <my_api_key>
The following message will be available after success:已保存Nuget库和符号服务器的API 秘钥
nuget spec
Tips:已成功创建 *.nuspec
, Notepad opens for editing
Modify the content yourself as needed
nuget pack Segmenter.csproj
Error occurred:
无法将类型为“System.String”的对象强制转换为类型“NuGet.Frameworks.NuGet.Frameworks1070507.NuGetFramework”。
Some people say that is the Nuget.exe version problem, I changed the NuGet version but the problem still exists, and later on the stack Overflow found the answer: Replace with Dotnet pack is OK.
dotnet pack
Success appears after: successfully create package ****.nupkg
Then upload the generated nupkg file to NuGet.
nuget push *.nupkg <you api key >
Error occurredSource paramter was not specified
Google saw that there was a problem and then found the answer on GitHub:
The correct approach is to:
nuget push *.nupkg <you api key> -Source https://api.nuget.org/v3/index.json
Successful push up.
And then you can see it on NuGet.
There are currently two stuttering participle releases of nuget
Each upload must be audited and approved before it can be accessed by the outside world.
In the future, you can search for keywords in nuget.结巴分词
We'll be able to find the NuGet package.
AddIf vs2017 released NuGet is simpler, see vs 2017 release NuGet
Remember the stuttering participle. NET Core version 2.0 NuGet release process