Marge fix MeCab.DotNet to NMeCab (Issue #32) #35
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@komutan ベースとなるPRを見ました。表面的な部分はOKと思います。少し手直ししたのがこのPRです。
ターゲットのバージョン(net45やnetstandard2.0、tfmと呼びます)ですが、出来れば絞り込みたいのはヤマヤマなのですが、以下のような経験があります:
このようなわけで、私のライブラリプロジェクトやNewtonsoft.Jsonのような、幅広い使われ方をするライブラリでは、一見すると使われそうにない多くのtfmに対応させています(特にライブラリパッケージは、大規模プロジェクトで依存関係が複雑になってくると、何でビルド結果がこうなるのかを説明するのが難しいような結果になります)
なので、NMeCabでもいくつかのtfmはサポートしておいたほうが良いと思います。範囲はおまかせします、参考にしてみて下さい:
*netstandard1系列とnetcoreapp1系列は、さすがにもう良いかという気はします(netstandard1.6辺りをやっておくと、互換性問題の検証になるかも、ぐらい)。また、netcoreapp2.0とnetcoreapp3.0はディスコンなので、強い心がないなら必要ないかと :) ビルドしたい場合は
CheckEolTargetFramework
をfalse
にするといいです。MeCabは何かのライブラリに使われると言うよりも、最終的なproduct(ASP.NETの実装とか、アプリとか)に使われる方が多いんじゃないかと思うので、上に挙げたライブラリからの利用による依存関係の複雑化についてはそこまで神経質にならなくても良いかも知れません。
以下はNewtonsoft.Jsonの例です。12.0.3ではPCLをサポートしていた関係で、かなり多くのftmに対応しています。最新の13.0.1ではPCLを諦めたので、多少減っています。
https://www.nuget.org/packages/Newtonsoft.Json/12.0.3
https://www.nuget.org/packages/Newtonsoft.Json/13.0.1
私のNamingFormatterも、出来るだけ依存性を排除したくて多くのtfmを盛ってあります。netcoreappは入っていませんが...:
https://www.nuget.org/packages/NamingFormatter/2.0.22