Revision | 0215893dfefc42ae0e632cc8d01f811bb4f0db8c (tree) |
---|---|
Time | 2018-05-25 23:07:24 |
Author | Takuya Sakurai <azyobuzin@user...> |
Commiter | Takuya Sakurai |
.NET Standardize
@@ -84,16 +84,16 @@ namespace NMeCab | ||
84 | 84 | public MeCabParam() |
85 | 85 | { |
86 | 86 | this.Theta = MeCabParam.DefaultTheta; |
87 | -#if !STREAM | |
88 | - this.RcFile = MeCabParam.DefaultRcFile; | |
89 | -#endif | |
90 | 87 | |
88 | +#if STREAM | |
89 | + this.OutputFormatType = "lattice"; | |
90 | +#else | |
91 | + this.RcFile = MeCabParam.DefaultRcFile; | |
91 | 92 | Properties.Settings settings = Properties.Settings.Default; |
92 | -#if !STREAM | |
93 | 93 | this.DicDir = settings.DicDir; |
94 | 94 | this.UserDic = this.SplitStringArray(settings.UserDic, ','); |
95 | -#endif | |
96 | 95 | this.OutputFormatType = settings.OutputFormatType; |
96 | +#endif | |
97 | 97 | } |
98 | 98 | |
99 | 99 | #if STREAM |
@@ -1,42 +1,16 @@ | ||
1 | -<?xml version="1.0" encoding="utf-8"?> | |
2 | -<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
3 | - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |
1 | +<Project Sdk="Microsoft.NET.Sdk"> | |
2 | + | |
4 | 3 | <PropertyGroup> |
5 | - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
6 | - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |
7 | - <ProjectGuid>{6831370D-007E-404D-BFE8-777D41514A8D}</ProjectGuid> | |
8 | - <OutputType>Library</OutputType> | |
9 | - <AppDesignerFolder>Properties</AppDesignerFolder> | |
4 | + <TargetFramework>netstandard2.0</TargetFramework> | |
10 | 5 | <RootNamespace>NMeCab</RootNamespace> |
11 | 6 | <AssemblyName>LibNMeCab</AssemblyName> |
12 | - <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> | |
13 | - <FileAlignment>512</FileAlignment> | |
14 | - </PropertyGroup> | |
15 | - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |
16 | - <DebugSymbols>true</DebugSymbols> | |
17 | - <DebugType>full</DebugType> | |
18 | - <Optimize>false</Optimize> | |
19 | - <OutputPath>bin\Debug\</OutputPath> | |
20 | - <DefineConstants>TRACE;DEBUG;EXT;STREAM</DefineConstants> | |
21 | - <ErrorReport>prompt</ErrorReport> | |
22 | - <WarningLevel>4</WarningLevel> | |
23 | - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | |
24 | - <DocumentationFile>bin\Debug\LibNMeCab.XML</DocumentationFile> | |
25 | - <NoWarn>1591;1573</NoWarn> | |
26 | - </PropertyGroup> | |
27 | - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |
28 | - <DebugType>pdbonly</DebugType> | |
29 | - <Optimize>true</Optimize> | |
30 | - <OutputPath>bin\Release\</OutputPath> | |
31 | - <DefineConstants>TRACE;EXT;STREAM</DefineConstants> | |
32 | - <ErrorReport>prompt</ErrorReport> | |
33 | - <WarningLevel>4</WarningLevel> | |
7 | + <DefineConstants>$(DefineConstants);EXT;STREAM</DefineConstants> | |
34 | 8 | <AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
35 | - <DocumentationFile>bin\Release\LibNMeCab.XML</DocumentationFile> | |
36 | - <NoWarn>1591;1573</NoWarn> | |
9 | + <VersionPrefix>0.0.7.0</VersionPrefix> | |
10 | + <Copyright>Copyright (c) 2011-2014 Tsuyoshi Komuta; 2016-2018 Takuya Sakurai</Copyright> | |
37 | 11 | </PropertyGroup> |
12 | + | |
38 | 13 | <ItemGroup> |
39 | - <Reference Include="System" /> | |
40 | 14 | <Compile Include="..\LibNMeCab\Core\BitUtils.cs"> |
41 | 15 | <Link>Core\BitUtils.cs</Link> |
42 | 16 | </Compile> |
@@ -121,31 +95,6 @@ | ||
121 | 95 | <Compile Include="..\LibNMeCab\MeCabTagger.cs"> |
122 | 96 | <Link>MeCabTagger.cs</Link> |
123 | 97 | </Compile> |
124 | - <Compile Include="..\LibNMeCab\Properties\Settings.Designer.cs"> | |
125 | - <Link>Properties\Settings.Designer.cs</Link> | |
126 | - <AutoGen>True</AutoGen> | |
127 | - <DesignTimeSharedInput>True</DesignTimeSharedInput> | |
128 | - <DependentUpon>Settings.settings</DependentUpon> | |
129 | - </Compile> | |
130 | - <Compile Include="..\LibNMeCab\Properties\SharedAssemblyInfo.cs"> | |
131 | - <Link>Properties\SharedAssemblyInfo.cs</Link> | |
132 | - </Compile> | |
133 | - <Compile Include="..\LibNMeCab\Settings.cs"> | |
134 | - <Link>Settings.cs</Link> | |
135 | - </Compile> | |
136 | - <None Include="..\LibNMeCab\Properties\Settings.settings"> | |
137 | - <Link>Properties\Settings.settings</Link> | |
138 | - <Generator>SettingsSingleFileGenerator</Generator> | |
139 | - <LastGenOutput>Settings.Designer.cs</LastGenOutput> | |
140 | - </None> | |
141 | - <None Include="app.config" /> | |
142 | 98 | </ItemGroup> |
143 | - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |
144 | - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |
145 | - Other similar extension points exist, see Microsoft.Common.targets. | |
146 | - <Target Name="BeforeBuild"> | |
147 | - </Target> | |
148 | - <Target Name="AfterBuild"> | |
149 | - </Target> | |
150 | - --> | |
99 | + | |
151 | 100 | </Project> |
\ No newline at end of file |
@@ -1,21 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="utf-8" ?> | |
2 | -<configuration> | |
3 | - <configSections> | |
4 | - <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > | |
5 | - <section name="NMeCab.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> | |
6 | - </sectionGroup> | |
7 | - </configSections> | |
8 | - <applicationSettings> | |
9 | - <NMeCab.Properties.Settings> | |
10 | - <setting name="UserDic" serializeAs="String"> | |
11 | - <value /> | |
12 | - </setting> | |
13 | - <setting name="OutputFormatType" serializeAs="String"> | |
14 | - <value>lattice</value> | |
15 | - </setting> | |
16 | - <setting name="DicDir" serializeAs="String"> | |
17 | - <value>dic\ipadic</value> | |
18 | - </setting> | |
19 | - </NMeCab.Properties.Settings> | |
20 | - </applicationSettings> | |
21 | -</configuration> | |
\ No newline at end of file |
@@ -1,44 +1,13 @@ | ||
1 | -<?xml version="1.0" encoding="utf-8"?> | |
2 | -<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
3 | - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |
1 | +<Project Sdk="Microsoft.NET.Sdk"> | |
2 | + | |
4 | 3 | <PropertyGroup> |
5 | - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
6 | - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |
7 | - <ProjectGuid>{DE32DA99-6FF2-4A3F-A6DE-88F547AA6BB0}</ProjectGuid> | |
8 | - <OutputType>Library</OutputType> | |
9 | - <AppDesignerFolder>Properties</AppDesignerFolder> | |
10 | - <RootNamespace>MeCabWrapper</RootNamespace> | |
11 | - <AssemblyName>MeCabWrapper</AssemblyName> | |
12 | - <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> | |
13 | - <FileAlignment>512</FileAlignment> | |
4 | + <TargetFramework>netstandard2.0</TargetFramework> | |
5 | + <VersionPrefix>1.0.1</VersionPrefix> | |
6 | + <Authors>Takuya Sakurai</Authors> | |
7 | + <PackageProjectUrl>https://osdn.net/users/azyobuzin/pf/NMeCabRepo2/wiki/FrontPage</PackageProjectUrl> | |
8 | + <Description>NMeCabと辞書のセット with YomiGenerator</Description> | |
14 | 9 | </PropertyGroup> |
15 | - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |
16 | - <DebugSymbols>true</DebugSymbols> | |
17 | - <DebugType>full</DebugType> | |
18 | - <Optimize>false</Optimize> | |
19 | - <OutputPath>bin\Debug\</OutputPath> | |
20 | - <DefineConstants>DEBUG;TRACE</DefineConstants> | |
21 | - <ErrorReport>prompt</ErrorReport> | |
22 | - <WarningLevel>4</WarningLevel> | |
23 | - </PropertyGroup> | |
24 | - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |
25 | - <DebugType>pdbonly</DebugType> | |
26 | - <Optimize>true</Optimize> | |
27 | - <OutputPath>bin\Release\</OutputPath> | |
28 | - <DefineConstants>TRACE</DefineConstants> | |
29 | - <ErrorReport>prompt</ErrorReport> | |
30 | - <WarningLevel>4</WarningLevel> | |
31 | - </PropertyGroup> | |
32 | - <ItemGroup> | |
33 | - <Reference Include="System" /> | |
34 | - <Reference Include="System.Core" /> | |
35 | - <Reference Include="Microsoft.CSharp" /> | |
36 | - </ItemGroup> | |
37 | - <ItemGroup> | |
38 | - <Compile Include="MeCabFarm.cs" /> | |
39 | - <Compile Include="Properties\AssemblyInfo.cs" /> | |
40 | - <Compile Include="YomiGenerator.cs" /> | |
41 | - </ItemGroup> | |
10 | + | |
42 | 11 | <ItemGroup> |
43 | 12 | <EmbeddedResource Include="..\..\dic\ipadic\char.bin"> |
44 | 13 | <Link>dic\ipadic\char.bin</Link> |
@@ -55,19 +24,11 @@ | ||
55 | 24 | <EmbeddedResource Include="..\..\dic\ipadic\unk.dic"> |
56 | 25 | <Link>dic\ipadic\unk.dic</Link> |
57 | 26 | </EmbeddedResource> |
27 | + <None Include="$(OutputPath)\LibNMeCab.dll" PackagePath="lib/$(TargetFramework)" Pack="true" Visible="false" /> | |
58 | 28 | </ItemGroup> |
29 | + | |
59 | 30 | <ItemGroup> |
60 | - <ProjectReference Include="..\LibNMeCab46Stream\LibNMeCab46Stream.csproj"> | |
61 | - <Project>{6831370d-007e-404d-bfe8-777d41514a8d}</Project> | |
62 | - <Name>LibNMeCab46Stream</Name> | |
63 | - </ProjectReference> | |
31 | + <ProjectReference Include="..\LibNMeCab46Stream\LibNMeCab46Stream.csproj" PrivateAssets="All" /> | |
64 | 32 | </ItemGroup> |
65 | - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |
66 | - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |
67 | - Other similar extension points exist, see Microsoft.Common.targets. | |
68 | - <Target Name="BeforeBuild"> | |
69 | - </Target> | |
70 | - <Target Name="AfterBuild"> | |
71 | - </Target> | |
72 | - --> | |
33 | + | |
73 | 34 | </Project> |
\ No newline at end of file |
@@ -1,36 +0,0 @@ | ||
1 | -using System.Reflection; | |
2 | -using System.Runtime.CompilerServices; | |
3 | -using System.Runtime.InteropServices; | |
4 | - | |
5 | -// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 | |
6 | -// アセンブリに関連付けられている情報を変更するには、 | |
7 | -// これらの属性値を変更してください。 | |
8 | -[assembly: AssemblyTitle("MeCabWrapper")] | |
9 | -[assembly: AssemblyDescription("")] | |
10 | -[assembly: AssemblyConfiguration("")] | |
11 | -[assembly: AssemblyCompany("")] | |
12 | -[assembly: AssemblyProduct("MeCabWrapper")] | |
13 | -[assembly: AssemblyCopyright("Copyright © 2017")] | |
14 | -[assembly: AssemblyTrademark("")] | |
15 | -[assembly: AssemblyCulture("")] | |
16 | - | |
17 | -// ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから | |
18 | -// 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 | |
19 | -// その型の ComVisible 属性を true に設定してください。 | |
20 | -[assembly: ComVisible(false)] | |
21 | - | |
22 | -// このプロジェクトが COM に公開される場合、次の GUID が typelib の ID になります | |
23 | -[assembly: Guid("de32da99-6ff2-4a3f-a6de-88f547aa6bb0")] | |
24 | - | |
25 | -// アセンブリのバージョン情報は次の 4 つの値で構成されています: | |
26 | -// | |
27 | -// メジャー バージョン | |
28 | -// マイナー バージョン | |
29 | -// ビルド番号 | |
30 | -// Revision | |
31 | -// | |
32 | -// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を | |
33 | -// 既定値にすることができます: | |
34 | -// [assembly: AssemblyVersion("1.0.*")] | |
35 | -[assembly: AssemblyVersion("1.0.0.0")] | |
36 | -[assembly: AssemblyFileVersion("1.0.0.0")] |