Updated ProgramSynthesis samples to 1.0.2
This commit is contained in:
Родитель
a708f9193a
Коммит
cba57a0cfe
|
@ -177,3 +177,7 @@ VersionInfo.cs
|
|||
|
||||
.vs/
|
||||
_site/
|
||||
.idea/
|
||||
node_modules/
|
||||
Gemfile.lock
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
[assembly: AssemblyTitle("ProseSample.Substrings")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
|
@ -18,11 +17,9 @@ using System.Runtime.InteropServices;
|
|||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
|
||||
[assembly: Guid("41e9a9b1-b013-4a87-9759-e3004fef8a81")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
|
@ -35,6 +32,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
|
@ -30,62 +30,234 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Antlr4.Runtime.net45, Version=4.3.0.0, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Antlr4.Runtime.4.3.0\lib\net45\Antlr4.Runtime.net45.dll</HintPath>
|
||||
<Reference Include="Antlr4.Runtime, Version=4.5.0.0, Culture=neutral, PublicKeyToken=09abb75b9ed49849, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Antlr4.Runtime.4.5.3\lib\net45\Antlr4.Runtime.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="CsQuery, Version=1.3.5.124, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CsQuery.1.3.5-beta5\lib\net40\CsQuery.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="dslc, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\dslc.exe</HintPath>
|
||||
<Reference Include="Microsoft.CodeAnalysis, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.CodeAnalysis.Common.1.3.2\lib\net45\Microsoft.CodeAnalysis.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Experimental.Collections, Version=1.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Experimental.Collections.1.0.3-alpha\lib\portable-net45+win8+wp8\Microsoft.Experimental.Collections.dll</HintPath>
|
||||
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.CodeAnalysis.CSharp.1.3.2\lib\net45\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.dll</HintPath>
|
||||
<Reference Include="Microsoft.ProgramSynthesis, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Extraction.dll</HintPath>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Compiler, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Compiler.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.dll</HintPath>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Compound.Extraction.Field, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Compound.Extraction.Field.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text.Learning, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.Learning.dll</HintPath>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Compound.Split, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Compound.Split.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text.Semantics, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.Semantics.dll</HintPath>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Conditionals, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Conditionals.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Learning, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Learning.dll</HintPath>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Conditionals.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Conditionals.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Utils, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Utils.dll</HintPath>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Conditionals.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Conditionals.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Conditionals.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Conditionals.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.CoreFxLab, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.CoreFxLab.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Json, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Json.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Json.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Json.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Json.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Json.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Json.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Json.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Json.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Matching.Text, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Matching.Text.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Matching.Text.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Matching.Text.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Matching.Text.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Matching.Text.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Matching.Text.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Matching.Text.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Matching.Text.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Matching.Text.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Paraphrasing, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Paraphrasing.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.File, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.File.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.File.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.File.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.File.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.File.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.File.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.File.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.Text, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.Text.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.Text.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.Text.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.Text.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.Text.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.Text.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.Text.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.Text.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.Text.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Json, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Json.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Json.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Json.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Json.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Json.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Json.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Text, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Text.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Text.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Text.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Text.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Text.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Text.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Text.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Translation, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Translation.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Translation.R, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Translation.R.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Utils, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Utils.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Wrangling, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Wrangling.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Wrangling.Json, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Wrangling.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Wrangling.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Wrangling.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Collections.Immutable, Version=1.1.36.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
||||
<Reference Include="System.Collections.Immutable, Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Interactive, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Ix-Main.1.2.5\lib\net45\System.Interactive.dll</HintPath>
|
||||
<Reference Include="System.Interactive, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Interactive.3.1.1\lib\net45\System.Interactive.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Reflection.Metadata, Version=1.0.21.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Reflection.Metadata.1.0.21\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
|
||||
<Reference Include="System.Reflection.Metadata, Version=1.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
|
@ -103,11 +275,16 @@
|
|||
<Compile Include="WitnessFunctions.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="ProseSample.Substrings.grammar">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Analyzer Include="..\..\packages\Microsoft.CodeAnalysis.Analyzers.1.1.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" />
|
||||
<Analyzer Include="..\..\packages\Microsoft.CodeAnalysis.Analyzers.1.1.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
reference 'Microsoft.ProgramSynthesis.Extraction.Text.Semantics.dll';
|
||||
reference 'ProseSample.Substrings.dll';
|
||||
#reference 'Microsoft.ProgramSynthesis.Extraction.Text.Semantics, Version=1.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35';
|
||||
#reference 'file:ProseSample.Substrings.dll';
|
||||
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.ProgramSynthesis.Extraction.Text.Semantics;
|
||||
|
@ -10,15 +10,14 @@ using learners ProseSample.Substrings.WitnessFunctions;
|
|||
|
||||
language ProseSample_Substrings;
|
||||
|
||||
@vardefault[VariableScore]
|
||||
feature double Score = RankingScore;
|
||||
@complete feature double Score = RankingScore;
|
||||
|
||||
@start StringRegion sub := SubStr(v, posPair);
|
||||
Tuple<uint?, uint?> posPair := PosPair(pos, pos) = Pair(pos, pos);
|
||||
uint? pos := AbsPos(v, k) | RegPos(v, rr, k);
|
||||
|
||||
Tuple<RegularExpression, RegularExpression> rr := BoundaryPair(r, r) = Pair(r, r);
|
||||
@feature[Score=RegexScore] RegularExpression r;
|
||||
RegularExpression r;
|
||||
|
||||
@input StringRegion v;
|
||||
@feature[Score=KScore] int k;
|
||||
int k;
|
||||
|
|
|
@ -1,40 +1,42 @@
|
|||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.ProgramSynthesis;
|
||||
using Microsoft.ProgramSynthesis.Extraction.Text.Semantics;
|
||||
using Microsoft.ProgramSynthesis;
|
||||
using Microsoft.ProgramSynthesis.AST;
|
||||
|
||||
namespace ProseSample.Substrings
|
||||
{
|
||||
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||
public static class RankingScore
|
||||
public class RankingScore : Feature<double>
|
||||
{
|
||||
public const double VariableScore = 0;
|
||||
public RankingScore(Grammar grammar): base(grammar, "Score") {}
|
||||
|
||||
[FeatureCalculator("SubStr")]
|
||||
protected override double GetFeatureValueForVariable(VariableNode variable) => 0;
|
||||
|
||||
[FeatureCalculator(nameof(Semantics.SubStr))]
|
||||
public static double Score_SubStr(double x, double pp) => Math.Log(pp);
|
||||
|
||||
[FeatureCalculator("PosPair")]
|
||||
public static double Score_PosPair(double pp1, double pp2) => pp1 * pp2;
|
||||
|
||||
[FeatureCalculator("AbsPos")]
|
||||
public static double Score_AbsPos(double x, double k)
|
||||
{
|
||||
k = 1 / k - 1;
|
||||
[FeatureCalculator(nameof(Semantics.AbsPos))]
|
||||
public static double Score_AbsPos(double x, double k) {
|
||||
k = 1.0 / k - 1;
|
||||
// Prefer absolute positions to regex positions if k is small
|
||||
return Math.Max(10 * Token.MinScore - (k - 1) * 3 * Token.MinScore, 1 / k);
|
||||
}
|
||||
|
||||
[FeatureCalculator(Method = CalculationMethod.FromLiteral)]
|
||||
[FeatureCalculator("k", Method = CalculationMethod.FromLiteral)]
|
||||
public static double KScore(int k) => k >= 0 ? 1.0 / (k + 1.0) : 1.0 / (-k + 1.1);
|
||||
|
||||
[FeatureCalculator("BoundaryPair")]
|
||||
public static double Score_BoundaryPair(double r1, double r2) => r1 + r2;
|
||||
|
||||
[FeatureCalculator("RegPos")]
|
||||
[FeatureCalculator(nameof(Semantics.RegPos))]
|
||||
public static double Score_RegPos(double x, double rr, double k) => rr * k;
|
||||
|
||||
[FeatureCalculator(Method = CalculationMethod.FromLiteral)]
|
||||
[FeatureCalculator("r", Method = CalculationMethod.FromLiteral)]
|
||||
public static double RegexScore(RegularExpression r) => r.Score;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,16 +60,15 @@ namespace ProseSample.Substrings
|
|||
};
|
||||
|
||||
private static Regex[] _leftTokens;
|
||||
public static readonly RegularExpression Epsilon = RegularExpression.Create();
|
||||
public static readonly RegularExpression Epsilon = RegularExpression.Create(new Token[0]);
|
||||
|
||||
public static Regex[] LeftTokens =>
|
||||
_leftTokens ?? (_leftTokens = Tokens.Select(t => new Regex($"(?<={t})", RegexOptions.Compiled)).ToArray());
|
||||
|
||||
public static List<PositionMatch> Run(this RegularExpression r, StringRegion v)
|
||||
=> r.Run(v.Cache, v.Start, v.End);
|
||||
public static PositionMatch[] Run(this RegularExpression r, StringRegion v) => r.Run(v);
|
||||
|
||||
public static bool MatchesAt(this RegularExpression r, StringRegion v, uint pos)
|
||||
=> r.MatchesAt(v.Cache, pos, v.Start, v.End);
|
||||
=> r.MatchesAt(v, pos);
|
||||
|
||||
public static int BinarySearchBy<T>(this IList<T> list, Func<T, int> comparer)
|
||||
{
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using FlashMeta.Core;
|
||||
using FlashMeta.Core.Rules;
|
||||
using FlashMeta.Core.Specifications;
|
||||
using FlashMeta.Core.Synthesis;
|
||||
|
||||
namespace MOD2015.Substrings.RelativePositioning {
|
||||
public static class LeftWitnessFunction {
|
||||
[WitnessFunction(0)]
|
||||
public static DisjunctiveExamplesSpecification WitnessLeft(LetRule rule, int parameter,
|
||||
DisjunctiveExamplesSpecification spec) {
|
||||
var examples = new Dictionary<State, IEnumerable<object>>();
|
||||
foreach (State input in spec.ProvidedInputs) {
|
||||
var leftPositions = new List<object>();
|
||||
foreach (Tuple<uint?, uint?> example in spec.DisjunctiveExamples[input]) {
|
||||
leftPositions.Add(example.Item1);
|
||||
}
|
||||
examples[input] = leftPositions;
|
||||
}
|
||||
return DisjunctiveExamplesSpecification.From(examples);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FlashMeta.Core;
|
||||
using FlashMeta.Core.Rules;
|
||||
using FlashMeta.Core.Specifications;
|
||||
using FlashMeta.Core.Synthesis;
|
||||
|
||||
namespace MOD2015.Substrings.RelativePositioning {
|
||||
public static class RightWitnessFunction {
|
||||
[WitnessFunction(0)]
|
||||
public static DisjunctiveExamplesSpecification WitnessRight(LetRule rule, int parameter,
|
||||
DisjunctiveExamplesSpecification spec) {
|
||||
var examples = new Dictionary<State, IEnumerable<object>>();
|
||||
foreach (State input in spec.ProvidedInputs) {
|
||||
var rightPositions = new List<object>();
|
||||
foreach (Tuple<uint?, uint?> example in spec.DisjunctiveExamples[input]) {
|
||||
rightPositions.Add(example.Item2);
|
||||
}
|
||||
examples[input] = rightPositions;
|
||||
}
|
||||
return DisjunctiveExamplesSpecification.From(examples);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,7 +2,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.ProgramSynthesis.Extraction.Text.Semantics;
|
||||
|
||||
namespace ProseSample.Substrings
|
||||
|
@ -13,8 +12,12 @@ namespace ProseSample.Substrings
|
|||
public static StringRegion SubStr(StringRegion v, Tuple<uint?, uint?> posPair)
|
||||
{
|
||||
uint? start = posPair.Item1, end = posPair.Item2;
|
||||
if (start == null || end == null || start < v.Start || start > v.End || end < v.Start || end > v.End)
|
||||
if (start == null || end == null ||
|
||||
start < v.Start || start > v.End || end < v.Start || end > v.End)
|
||||
{
|
||||
return null;
|
||||
|
||||
}
|
||||
return v.Slice((uint) start, (uint) end);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,59 +5,63 @@ using System.Linq;
|
|||
using System.Text.RegularExpressions;
|
||||
using Microsoft.ProgramSynthesis;
|
||||
using Microsoft.ProgramSynthesis.Extraction.Text.Semantics;
|
||||
using Microsoft.ProgramSynthesis.Learning;
|
||||
using Microsoft.ProgramSynthesis.Rules;
|
||||
using Microsoft.ProgramSynthesis.Specifications;
|
||||
using Microsoft.ProgramSynthesis.Learning;
|
||||
using Microsoft.ProgramSynthesis.Utils;
|
||||
using static ProseSample.Substrings.RegexUtils;
|
||||
|
||||
namespace ProseSample.Substrings
|
||||
{
|
||||
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||
public static class WitnessFunctions
|
||||
public class WitnessFunctions : DomainLearningLogic
|
||||
{
|
||||
[WitnessFunction("SubStr", 1)]
|
||||
public static DisjunctiveExamplesSpec WitnessPositionPair(GrammarRule rule, int parameter,
|
||||
ExampleSpec spec)
|
||||
public WitnessFunctions(Grammar grammar) : base(grammar) {}
|
||||
|
||||
[WitnessFunction(nameof(Semantics.SubStr), 1)]
|
||||
public static DisjunctiveExamplesSpec WitnessPositionPair(GrammarRule rule, ExampleSpec spec)
|
||||
{
|
||||
var ppExamples = new Dictionary<State, IEnumerable<object>>();
|
||||
foreach (State input in spec.ProvidedInputs)
|
||||
{
|
||||
var v = (StringRegion) input[rule.Body[0]];
|
||||
var desiredOutput = (StringRegion) spec.Examples[input];
|
||||
var occurrences = new List<object>();
|
||||
|
||||
var occurrences = new List<Tuple<uint?, uint?>>();
|
||||
for (int i = v.Value.IndexOf(desiredOutput.Value, StringComparison.Ordinal);
|
||||
i >= 0;
|
||||
i = v.Value.IndexOf(desiredOutput.Value, i + 1, StringComparison.Ordinal))
|
||||
{
|
||||
occurrences.Add(Tuple.Create(v.Start + (uint?) i, v.Start + (uint?) i + desiredOutput.Length));
|
||||
}
|
||||
|
||||
ppExamples[input] = occurrences;
|
||||
}
|
||||
return DisjunctiveExamplesSpec.From(ppExamples);
|
||||
}
|
||||
|
||||
[WitnessFunction("AbsPos", 1)]
|
||||
public static DisjunctiveExamplesSpec WitnessK(GrammarRule rule, int parameter,
|
||||
DisjunctiveExamplesSpec spec)
|
||||
[WitnessFunction(nameof(Semantics.AbsPos), 1)]
|
||||
public static DisjunctiveExamplesSpec WitnessK(GrammarRule rule, DisjunctiveExamplesSpec spec)
|
||||
{
|
||||
var kExamples = new Dictionary<State, IEnumerable<object>>();
|
||||
foreach (State input in spec.ProvidedInputs)
|
||||
{
|
||||
var v = (StringRegion) input[rule.Body[0]];
|
||||
|
||||
var positions = new List<object>();
|
||||
foreach (uint pos in spec.DisjunctiveExamples[input])
|
||||
{
|
||||
positions.Add((int) pos + 1 - (int) v.Start);
|
||||
positions.Add((int) pos - (int) v.End - 1);
|
||||
}
|
||||
|
||||
kExamples[input] = positions;
|
||||
}
|
||||
return DisjunctiveExamplesSpec.From(kExamples);
|
||||
}
|
||||
|
||||
[WitnessFunction("RegPos", 1)]
|
||||
public static DisjunctiveExamplesSpec WitnessRegexPair(GrammarRule rule, int parameter,
|
||||
[WitnessFunction(nameof(Semantics.RegPos), 1)]
|
||||
public static DisjunctiveExamplesSpec WitnessRegexPair(GrammarRule rule,
|
||||
DisjunctiveExamplesSpec spec)
|
||||
{
|
||||
var rrExamples = new Dictionary<State, IEnumerable<object>>();
|
||||
|
@ -67,13 +71,19 @@ namespace ProseSample.Substrings
|
|||
var regexes = new List<Tuple<RegularExpression, RegularExpression>>();
|
||||
foreach (uint pos in spec.DisjunctiveExamples[input])
|
||||
{
|
||||
Dictionary<Token, TokenMatch> rightMatches;
|
||||
MultiValueDictionary<Token, TokenMatch> rightMatches;
|
||||
if (!v.Cache.TryGetAllMatchesStartingAt(pos, out rightMatches)) continue;
|
||||
Dictionary<Token, TokenMatch> leftMatches;
|
||||
MultiValueDictionary<Token, TokenMatch> leftMatches;
|
||||
if (!v.Cache.TryGetAllMatchesEndingAt(pos, out leftMatches)) continue;
|
||||
var leftRegexes = leftMatches.Keys.Select(RegularExpression.Create).Append(Epsilon);
|
||||
var rightRegexes = rightMatches.Keys.Select(RegularExpression.Create).Append(Epsilon);
|
||||
var regexPairs = from l in leftRegexes from r in rightRegexes select Tuple.Create(l, r);
|
||||
var leftRegexes =
|
||||
leftMatches.Keys.Select(t => RegularExpression.Create(new[] { t }))
|
||||
.Append(Epsilon);
|
||||
var rightRegexes =
|
||||
rightMatches.Keys.Select(t => RegularExpression.Create(new[] { t }))
|
||||
.Append(Epsilon);
|
||||
var regexPairs = from l in leftRegexes
|
||||
from r in rightRegexes
|
||||
select Tuple.Create(l, r);
|
||||
regexes.AddRange(regexPairs);
|
||||
}
|
||||
rrExamples[input] = regexes;
|
||||
|
@ -81,8 +91,8 @@ namespace ProseSample.Substrings
|
|||
return DisjunctiveExamplesSpec.From(rrExamples);
|
||||
}
|
||||
|
||||
[WitnessFunction("RegPos", 2, DependsOnParameters = new[] { 1 })]
|
||||
public static DisjunctiveExamplesSpec WitnessRegexCount(GrammarRule rule, int parameter,
|
||||
[WitnessFunction(nameof(Semantics.RegPos), 2, DependsOnParameters = new[] { 1 })]
|
||||
public static DisjunctiveExamplesSpec WitnessRegexCount(GrammarRule rule,
|
||||
DisjunctiveExamplesSpec spec,
|
||||
ExampleSpec regexBinding)
|
||||
{
|
||||
|
@ -91,6 +101,7 @@ namespace ProseSample.Substrings
|
|||
{
|
||||
var v = (StringRegion) input[rule.Body[0]];
|
||||
var rr = (Tuple<RegularExpression, RegularExpression>) regexBinding.Examples[input];
|
||||
|
||||
var ks = new List<object>();
|
||||
foreach (uint pos in spec.DisjunctiveExamples[input])
|
||||
{
|
||||
|
@ -100,6 +111,7 @@ namespace ProseSample.Substrings
|
|||
ks.Add(index + 1);
|
||||
ks.Add(index - ms.Length);
|
||||
}
|
||||
|
||||
kExamples[input] = ks;
|
||||
}
|
||||
return DisjunctiveExamplesSpec.From(kExamples);
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.4.1.0" newVersion="1.4.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Interactive" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1000.0" newVersion="3.0.1000.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.3.1.0" newVersion="1.3.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.3.1.0" newVersion="1.3.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -1,10 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Antlr4.Runtime" version="4.3.0" targetFramework="net452" />
|
||||
<package id="Antlr4.Runtime" version="4.5.3" targetFramework="net452" />
|
||||
<package id="CsQuery" version="1.3.5-beta5" targetFramework="net452" />
|
||||
<package id="Ix-Main" version="1.2.5" targetFramework="net452" />
|
||||
<package id="Microsoft.Experimental.Collections" version="1.0.3-alpha" targetFramework="net452" />
|
||||
<package id="Microsoft.ProgramSynthesis" version="0.1.1-preview-1" targetFramework="net452" />
|
||||
<package id="System.Collections.Immutable" version="1.1.36" targetFramework="net452" />
|
||||
<package id="System.Reflection.Metadata" version="1.0.21" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.Analyzers" version="1.1.0" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.Common" version="1.3.2" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.CSharp" version="1.3.2" targetFramework="net452" />
|
||||
<package id="Microsoft.ProgramSynthesis" version="1.0.2" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
|
||||
<package id="System.Collections.Immutable" version="1.3.1" targetFramework="net452" />
|
||||
<package id="System.Interactive" version="3.1.1" targetFramework="net452" />
|
||||
<package id="System.Reflection.Metadata" version="1.4.2" targetFramework="net452" />
|
||||
</packages>
|
|
@ -5,7 +5,6 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
[assembly: AssemblyTitle("ProseSample.TextExtraction")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
|
@ -18,11 +17,9 @@ using System.Runtime.InteropServices;
|
|||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
|
||||
[assembly: Guid("5aa217f9-deab-46be-81be-afd00948ac50")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
|
@ -35,6 +32,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
|
@ -30,67 +30,238 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Antlr4.Runtime.net45, Version=4.3.0.0, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Antlr4.Runtime.4.3.0\lib\net45\Antlr4.Runtime.net45.dll</HintPath>
|
||||
<Reference Include="Antlr4.Runtime, Version=4.5.0.0, Culture=neutral, PublicKeyToken=09abb75b9ed49849, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Antlr4.Runtime.4.5.3\lib\net45\Antlr4.Runtime.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="CsQuery, Version=1.3.5.124, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CsQuery.1.3.5-beta5\lib\net40\CsQuery.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="dslc, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\dslc.exe</HintPath>
|
||||
<Reference Include="Microsoft.CodeAnalysis, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.CodeAnalysis.Common.1.3.2\lib\net45\Microsoft.CodeAnalysis.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Experimental.Collections, Version=1.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Experimental.Collections.1.0.3-alpha\lib\portable-net45+win8+wp8\Microsoft.Experimental.Collections.dll</HintPath>
|
||||
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.CodeAnalysis.CSharp.1.3.2\lib\net45\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.dll</HintPath>
|
||||
<Reference Include="Microsoft.ProgramSynthesis, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Extraction.dll</HintPath>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Compiler, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Compiler.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.dll</HintPath>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Compound.Extraction.Field, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Compound.Extraction.Field.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text.Learning, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.Learning.dll</HintPath>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Compound.Split, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Compound.Split.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text.Semantics, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.Semantics.dll</HintPath>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Conditionals, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Conditionals.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Learning, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Learning.dll</HintPath>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Conditionals.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Conditionals.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Utils, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Utils.dll</HintPath>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Conditionals.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Conditionals.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Conditionals.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Conditionals.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.CoreFxLab, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.CoreFxLab.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Json, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Json.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Json.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Json.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Json.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Json.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Json.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Json.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Json.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Matching.Text, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Matching.Text.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Matching.Text.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Matching.Text.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Matching.Text.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Matching.Text.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Matching.Text.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Matching.Text.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Matching.Text.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Matching.Text.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Paraphrasing, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Paraphrasing.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.File, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.File.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.File.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.File.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.File.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.File.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.File.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.File.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.Text, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.Text.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.Text.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.Text.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.Text.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.Text.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.Text.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.Text.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.Text.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.Text.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Json, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Json.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Json.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Json.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Json.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Json.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Json.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Text, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Text.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Text.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Text.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Text.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Text.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Text.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Text.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Translation, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Translation.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Translation.R, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Translation.R.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Utils, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Utils.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Wrangling, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Wrangling.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Wrangling.Json, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Wrangling.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Wrangling.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Wrangling.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Collections.Immutable, Version=1.1.36.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
||||
<Reference Include="System.Collections.Immutable, Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Interactive, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Ix-Main.1.2.5\lib\net45\System.Interactive.dll</HintPath>
|
||||
<Reference Include="System.Interactive, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Interactive.3.1.1\lib\net45\System.Interactive.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Reflection.Metadata, Version=1.0.21.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Reflection.Metadata.1.0.21\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
|
||||
<Reference Include="System.Reflection.Metadata, Version=1.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
|
@ -102,6 +273,7 @@
|
|||
<Compile Include="WitnessFunctions.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="ProseSample.TextExtraction.grammar">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
|
@ -113,6 +285,10 @@
|
|||
<Name>ProseSample.Substrings</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Analyzer Include="..\..\packages\Microsoft.CodeAnalysis.Analyzers.1.1.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" />
|
||||
<Analyzer Include="..\..\packages\Microsoft.CodeAnalysis.Analyzers.1.1.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
|
|
@ -1,21 +1,22 @@
|
|||
reference 'ProseSample.Substrings.grammar.xml';
|
||||
reference 'ProseSample.TextExtraction.dll';
|
||||
reference 'Microsoft.ProgramSynthesis.Utils.dll';
|
||||
reference 'Microsoft.ProgramSynthesis.Extraction.Text.Semantics.dll';
|
||||
#reference 'Microsoft.ProgramSynthesis.Utils, Version=1.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35';
|
||||
#reference 'Microsoft.ProgramSynthesis.Extraction.Text.Semantics, Version=1.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35';
|
||||
#reference 'file:ProseSample.TextExtraction.dll';
|
||||
#reference 'file:ProseSample.Substrings.Language.dll';
|
||||
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.ProgramSynthesis.Extraction.Text.Semantics;
|
||||
using ProseSample.TextExtraction;
|
||||
|
||||
using semantics ProseSample.TextExtraction.Semantics;
|
||||
using learners ProseSample.TextExtraction.WitnessFunctions;
|
||||
|
||||
language ProseSample_TextExtraction;
|
||||
|
||||
@vardefault[VariableScore]
|
||||
feature double Score = RankingScore;
|
||||
@complete feature double Score = RankingScore;
|
||||
|
||||
@start IEnumerable<StringRegion> spans := LinesMap(selection, lines) = Map(\line: StringRegion => selection, lines);
|
||||
StringRegion selection := @featuremap[Score=Score] @subst[v := line] ProseSample_Substrings.sub;
|
||||
@start IEnumerable<StringRegion> spans :=
|
||||
LinesMap(selection, lines) = Map(\line: StringRegion => selection, lines);
|
||||
StringRegion selection := @id['Selection'] @subst[v := line] ProseSample_Substrings.sub;
|
||||
|
||||
IEnumerable<StringRegion> lines := SplitLines(document);
|
||||
|
||||
|
|
|
@ -3,14 +3,21 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.ProgramSynthesis;
|
||||
using Microsoft.ProgramSynthesis.Extraction.Text.Semantics;
|
||||
using Microsoft.ProgramSynthesis;
|
||||
using Microsoft.ProgramSynthesis.AST;
|
||||
|
||||
namespace ProseSample.TextExtraction
|
||||
{
|
||||
public static class RankingScore
|
||||
public class RankingScore : Feature<double>
|
||||
{
|
||||
public const double VariableScore = 0;
|
||||
public RankingScore(Grammar grammar) : base(grammar, "Score") { }
|
||||
|
||||
protected override double GetFeatureValueForVariable(VariableNode variable) => 0;
|
||||
|
||||
[ExternFeatureMapping("Selection", 0)]
|
||||
public IFeature ExternScore
|
||||
=> new Substrings.RankingScore(Grammar.GrammarReferences["ProseSample_Substrings"]);
|
||||
|
||||
[FeatureCalculator("SplitLines")]
|
||||
public static double Score_SplitLines(double document) => document;
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace ProseSample.TextExtraction
|
|||
{
|
||||
public static IEnumerable<StringRegion> SplitLines(StringRegion document)
|
||||
{
|
||||
Token lineBreak = StringLearningCache.GetStaticTokenByName(Token.LineSeparatorName);
|
||||
Token lineBreak = document.Cache.GetStaticTokenByName(Token.LineSeparatorName);
|
||||
CachedList lineBreakPositions;
|
||||
if (!document.Cache.TryGetMatchPositionsFor(lineBreak, out lineBreakPositions))
|
||||
return new[] { document };
|
||||
|
|
|
@ -3,26 +3,27 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.ProgramSynthesis;
|
||||
using Microsoft.ProgramSynthesis.Extraction.Text.Semantics;
|
||||
using Microsoft.ProgramSynthesis.Learning;
|
||||
using Microsoft.ProgramSynthesis;
|
||||
using Microsoft.ProgramSynthesis.Rules;
|
||||
using Microsoft.ProgramSynthesis.Specifications;
|
||||
using Microsoft.ProgramSynthesis.Learning;
|
||||
using static Microsoft.ProgramSynthesis.Extraction.Text.Semantics.Semantics;
|
||||
|
||||
namespace ProseSample.TextExtraction
|
||||
{
|
||||
public static class WitnessFunctions
|
||||
public class WitnessFunctions : DomainLearningLogic
|
||||
{
|
||||
public WitnessFunctions(Grammar grammar) : base(grammar) {}
|
||||
|
||||
[WitnessFunction("LinesMap", 1)]
|
||||
public static PrefixSpec WitnessLinesMap(GrammarRule rule, int parameter,
|
||||
PrefixSpec spec)
|
||||
public static PrefixSpec WitnessLinesMap(GrammarRule rule, PrefixSpec spec)
|
||||
{
|
||||
var linesExamples = new Dictionary<State, IEnumerable<object>>();
|
||||
foreach (State input in spec.ProvidedInputs)
|
||||
{
|
||||
var document = ((StringRegion) input[rule.Grammar.InputSymbol]);
|
||||
var selectionPrefix = spec.Examples[input].Cast<StringRegion>();
|
||||
var document = (StringRegion) input[rule.Grammar.InputSymbol];
|
||||
var selectionPrefix = spec.PositiveExamples[input].Cast<StringRegion>();
|
||||
|
||||
var linesContainingSelection = new List<StringRegion>();
|
||||
foreach (StringRegion example in selectionPrefix)
|
||||
|
@ -38,5 +39,9 @@ namespace ProseSample.TextExtraction
|
|||
}
|
||||
return new PrefixSpec(linesExamples);
|
||||
}
|
||||
|
||||
[ExternLearningLogicMapping("Selection")]
|
||||
public DomainLearningLogic ExternWitnessFunction
|
||||
=> new Substrings.WitnessFunctions(Grammar.GrammarReferences["ProseSample_Substrings"]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.3.1.0" newVersion="1.3.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.3.1.0" newVersion="1.3.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.4.1.0" newVersion="1.4.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Interactive" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1000.0" newVersion="3.0.1000.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -1,10 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Antlr4.Runtime" version="4.3.0" targetFramework="net452" />
|
||||
<package id="Antlr4.Runtime" version="4.5.3" targetFramework="net452" />
|
||||
<package id="CsQuery" version="1.3.5-beta5" targetFramework="net452" />
|
||||
<package id="Ix-Main" version="1.2.5" targetFramework="net452" />
|
||||
<package id="Microsoft.Experimental.Collections" version="1.0.3-alpha" targetFramework="net452" />
|
||||
<package id="Microsoft.ProgramSynthesis" version="0.1.1-preview-1" targetFramework="net452" />
|
||||
<package id="System.Collections.Immutable" version="1.1.36" targetFramework="net452" />
|
||||
<package id="System.Reflection.Metadata" version="1.0.21" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.Analyzers" version="1.1.0" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.Common" version="1.3.2" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.CSharp" version="1.3.2" targetFramework="net452" />
|
||||
<package id="Microsoft.ProgramSynthesis" version="1.0.2" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
|
||||
<package id="System.Collections.Immutable" version="1.3.1" targetFramework="net452" />
|
||||
<package id="System.Interactive" version="3.1.1" targetFramework="net452" />
|
||||
<package id="System.Reflection.Metadata" version="1.4.2" targetFramework="net452" />
|
||||
</packages>
|
|
@ -1,14 +1,87 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
<system.diagnostics>
|
||||
<trace autoflush="true">
|
||||
<listeners>
|
||||
<add name="consoleListener" type="System.Diagnostics.ConsoleTraceListener" />
|
||||
</listeners>
|
||||
</trace>
|
||||
</system.diagnostics>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.3.1.0" newVersion="1.3.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.3.1.0" newVersion="1.3.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.4.1.0" newVersion="1.4.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Composition.AttributedModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.0.30.0" newVersion="1.0.30.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Composition.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.0.30.0" newVersion="1.0.30.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Composition.TypedParts" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.0.30.0" newVersion="1.0.30.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Composition.Hosting" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.0.30.0" newVersion="1.0.30.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Interactive" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1000.0" newVersion="3.0.1000.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.ProgramSynthesis.Wrangling" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.0.1.0" newVersion="1.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.ProgramSynthesis.Extraction.Text.Semantics" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.0.1.0" newVersion="1.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.ProgramSynthesis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.0.1.0" newVersion="1.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.ProgramSynthesis.Utils" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.0.1.0" newVersion="1.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.ProgramSynthesis.Extraction.Text" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.0.1.0" newVersion="1.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.ProgramSynthesis.Learning" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.0.1.0" newVersion="1.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.ProgramSynthesis.CoreFxLab" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.0.2.0" newVersion="1.0.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.ProgramSynthesis.Extraction.Text.Learning" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.0.1.0" newVersion="1.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.ProgramSynthesis.Paraphrasing" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.0.1.0" newVersion="1.0.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -2,11 +2,16 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.ProgramSynthesis.Extraction.Text.Semantics;
|
||||
using Microsoft.ProgramSynthesis.Compiler;
|
||||
using Microsoft.ProgramSynthesis;
|
||||
using Microsoft.ProgramSynthesis.AST;
|
||||
using Microsoft.ProgramSynthesis.Extraction.Text.Semantics;
|
||||
using Microsoft.ProgramSynthesis.Diagnostics;
|
||||
using Microsoft.ProgramSynthesis.Extraction.Text;
|
||||
using Microsoft.ProgramSynthesis.Specifications;
|
||||
using Microsoft.ProgramSynthesis.Specifications.Extensions;
|
||||
using Microsoft.ProgramSynthesis.Learning;
|
||||
using Microsoft.ProgramSynthesis.Utils;
|
||||
using static ProseSample.Utils;
|
||||
|
||||
|
@ -16,7 +21,7 @@ namespace ProseSample
|
|||
{
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
LoadAndTestSubstrings();
|
||||
//LoadAndTestSubstrings();
|
||||
LoadAndTestTextExtraction();
|
||||
}
|
||||
|
||||
|
@ -25,15 +30,16 @@ namespace ProseSample
|
|||
var grammar = LoadGrammar("ProseSample.Substrings.grammar");
|
||||
if (grammar == null) return;
|
||||
|
||||
ProgramNode p = grammar.ParseAST(@"SubStr(v, PosPair(AbsPos(v, -4), AbsPos(v, -1)))",
|
||||
ASTSerializationFormat.HumanReadable);
|
||||
StringRegion prose = StringRegion.Create("Microsoft Program Synthesis using Examples SDK");
|
||||
State input = State.Create(grammar.InputSymbol, prose);
|
||||
ProgramNode p = ProgramNode.Parse(@"SubStr(v, PosPair(AbsPos(v, -4), AbsPos(v, -1)))",
|
||||
grammar, ASTSerializationFormat.HumanReadable);
|
||||
StringRegion data = RegionLearner.CreateStringRegion("Microsoft PROSE SDK");
|
||||
State input = State.Create(grammar.InputSymbol, data);
|
||||
Console.WriteLine(p.Invoke(input));
|
||||
|
||||
StringRegion sdk = prose.Slice(prose.End - 3, prose.End);
|
||||
Spec spec = ShouldConvert.Given(grammar).To(prose, sdk);
|
||||
Learn(grammar, spec);
|
||||
StringRegion sdk = data.Slice(data.End - 3, data.End);
|
||||
Spec spec = ShouldConvert.Given(grammar).To(data, sdk);
|
||||
Learn(grammar, spec,
|
||||
new Substrings.RankingScore(grammar), new Substrings.WitnessFunctions(grammar));
|
||||
|
||||
TestFlashFillBenchmark(grammar, "emails");
|
||||
}
|
||||
|
@ -46,16 +52,21 @@ namespace ProseSample
|
|||
var parts = l.Split(new[] { "\t" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
return Tuple.Create(parts[0], parts[1]);
|
||||
}).ToArray();
|
||||
var examples = data.Take(exampleCount)
|
||||
.ToDictionary(t => State.Create(grammar.InputSymbol, StringRegion.Create(t.Item1)),
|
||||
t => (object) StringRegion.Create(t.Item2));
|
||||
var examples =
|
||||
data.Take(exampleCount)
|
||||
.ToDictionary(
|
||||
t => State.Create(grammar.InputSymbol, RegionLearner.CreateStringRegion(t.Item1)),
|
||||
t => (object) RegionLearner.CreateStringRegion(t.Item2));
|
||||
var spec = new ExampleSpec(examples);
|
||||
ProgramNode program = Learn(grammar, spec);
|
||||
ProgramNode program = Learn(grammar, spec,
|
||||
new Substrings.RankingScore(grammar),
|
||||
new Substrings.WitnessFunctions(grammar));
|
||||
foreach (Tuple<string, string> row in data.Skip(exampleCount))
|
||||
{
|
||||
State input = State.Create(grammar.InputSymbol, StringRegion.Create(row.Item1));
|
||||
var output = (StringRegion) program.Invoke(input);
|
||||
WriteColored(ConsoleColor.DarkCyan, $"{row.Item1} => {output.Value}");
|
||||
State input = State.Create(grammar.InputSymbol,
|
||||
RegionLearner.CreateStringRegion(row.Item1));
|
||||
var output = program.Invoke(input);
|
||||
WriteColored(ConsoleColor.DarkCyan, $"{row.Item1} => {output}");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,18 +75,23 @@ namespace ProseSample
|
|||
var grammar = LoadGrammar("ProseSample.TextExtraction.grammar", "ProseSample.Substrings.grammar");
|
||||
if (grammar == null) return;
|
||||
|
||||
TestExtractionBenchmark(grammar, "countries");
|
||||
TestTextExtractionBenchmark(grammar, "countries");
|
||||
TestTextExtractionBenchmark(grammar, "popl13-erc");
|
||||
}
|
||||
|
||||
private static void TestExtractionBenchmark(Grammar grammar, string benchmark)
|
||||
private static void TestTextExtractionBenchmark(Grammar grammar, string benchmark)
|
||||
{
|
||||
StringRegion document;
|
||||
List<StringRegion> examples = LoadBenchmark($"benchmarks/{benchmark}.txt", out document);
|
||||
var input = State.Create(grammar.InputSymbol, document);
|
||||
var spec = new PrefixSpec(input, examples);
|
||||
ProgramNode program = Learn(grammar, spec);
|
||||
string[] output = program.Invoke(input).ToEnumerable().Select(s => ((StringRegion) s).Value).ToArray();
|
||||
WriteColored(ConsoleColor.DarkCyan, output.DumpCollection(openDelim: "", closeDelim: "", separator: "\n"));
|
||||
ProgramNode program = Learn(grammar, spec,
|
||||
new TextExtraction.RankingScore(grammar),
|
||||
new TextExtraction.WitnessFunctions(grammar));
|
||||
string[] output =
|
||||
program.Invoke(input).ToEnumerable().Select(s => ((StringRegion) s).Value).ToArray();
|
||||
WriteColored(ConsoleColor.DarkCyan,
|
||||
output.DumpCollection(openDelim: "", closeDelim: "", separator: "\n"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
[assembly: AssemblyTitle("ProseSample")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
|
@ -18,11 +17,9 @@ using System.Runtime.InteropServices;
|
|||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
|
||||
[assembly: Guid("c7fc4d3c-3cae-42b9-aff9-83cb07a7872f")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
|
@ -35,6 +32,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(SolutionDir)packages\Antlr4.4.3.0\build\Antlr4.props" Condition="Exists('$(SolutionDir)packages\Antlr4.4.3.0\build\Antlr4.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
|
@ -35,6 +34,265 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Antlr4.Runtime, Version=4.5.0.0, Culture=neutral, PublicKeyToken=09abb75b9ed49849, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Antlr4.Runtime.4.5.3\lib\net45\Antlr4.Runtime.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="CsQuery, Version=1.3.5.124, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CsQuery.1.3.5-beta5\lib\net40\CsQuery.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.CodeAnalysis.Common.1.3.2\lib\net45\Microsoft.CodeAnalysis.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.CodeAnalysis.CSharp.1.3.2\lib\net45\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Compiler, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Compiler.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Compound.Extraction.Field, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Compound.Extraction.Field.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Compound.Split, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Compound.Split.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Conditionals, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Conditionals.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Conditionals.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Conditionals.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Conditionals.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Conditionals.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Conditionals.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Conditionals.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.CoreFxLab, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.CoreFxLab.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Json, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Json.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Json.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Json.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Json.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Json.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Json.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Json.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Json.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Matching.Text, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Matching.Text.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Matching.Text.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Matching.Text.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Matching.Text.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Matching.Text.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Matching.Text.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Matching.Text.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Matching.Text.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Matching.Text.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Paraphrasing, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Paraphrasing.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.File, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.File.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.File.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.File.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.File.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.File.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.File.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.File.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.Text, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.Text.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.Text.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.Text.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.Text.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.Text.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.Text.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.Text.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Split.Text.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Split.Text.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Json, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Json.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Json.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Json.Learning, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Json.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Json.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Json.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Text, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Text.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Text.Language, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Text.Language.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Text.Semantics, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Text.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Transformation.Text.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Transformation.Text.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Translation, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Translation.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Translation.R, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Translation.R.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Utils, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Utils.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Wrangling, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Wrangling.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Wrangling.Json, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Wrangling.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Wrangling.Translation.Python, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ProgramSynthesis.1.0.2\lib\net45\Microsoft.ProgramSynthesis.Wrangling.Translation.Python.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Collections.Immutable, Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Composition.AttributedModel, Version=1.0.30.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.Convention, Version=1.0.30.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.Hosting, Version=1.0.30.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.Runtime, Version=1.0.30.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Composition.TypedParts, Version=1.0.30.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Interactive, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Interactive.3.1.1\lib\net45\System.Interactive.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Reflection.Metadata, Version=1.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
@ -49,8 +307,14 @@
|
|||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Analyzer Include="$(SolutionDir)packages\Microsoft.CodeAnalysis.Analyzers.1.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" />
|
||||
<Analyzer Include="$(SolutionDir)packages\Microsoft.CodeAnalysis.Analyzers.1.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
|
||||
<Content Include="..\benchmarks\countries.txt">
|
||||
<Link>benchmarks\countries.txt</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\benchmarks\popl13-erc.txt">
|
||||
<Link>benchmarks\popl13-erc.txt</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ProseSample.Substrings\ProseSample.Substrings.csproj">
|
||||
|
@ -63,59 +327,10 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="..\benchmarks\countries.txt">
|
||||
<Link>benchmarks\countries.txt</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CsQuery, Version=1.3.5.124, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CsQuery.1.3.5-beta5\lib\net40\CsQuery.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="dslc, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\dslc.exe</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Extraction.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text.Learning, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Extraction.Text.Semantics, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Extraction.Text.Semantics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Learning, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Learning.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ProgramSynthesis.Utils, Version=0.1.1.2395, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ProgramSynthesis.0.1.1-preview-1\lib\net45\Microsoft.ProgramSynthesis.Utils.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Analyzer Include="..\..\packages\Microsoft.CodeAnalysis.Analyzers.1.1.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" />
|
||||
<Analyzer Include="..\..\packages\Microsoft.CodeAnalysis.Analyzers.1.1.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\Antlr4.4.3.0\build\Antlr4.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Antlr4.4.3.0\build\Antlr4.props'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\Antlr4.4.3.0\build\Antlr4.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Antlr4.4.3.0\build\Antlr4.targets'))" />
|
||||
</Target>
|
||||
<Import Project="$(SolutionDir)packages\Antlr4.4.3.0\build\Antlr4.targets" Condition="Exists('$(SolutionDir)packages\Antlr4.4.3.0\build\Antlr4.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
|
|
@ -8,9 +8,11 @@ using System.Threading.Tasks;
|
|||
using Microsoft.ProgramSynthesis;
|
||||
using Microsoft.ProgramSynthesis.AST;
|
||||
using Microsoft.ProgramSynthesis.Compiler;
|
||||
using Microsoft.ProgramSynthesis.Extraction.Text;
|
||||
using Microsoft.ProgramSynthesis.Extraction.Text.Semantics;
|
||||
using Microsoft.ProgramSynthesis.Learning;
|
||||
using Microsoft.ProgramSynthesis.Learning.Logging;
|
||||
using Microsoft.ProgramSynthesis.Learning.Strategies;
|
||||
using Microsoft.ProgramSynthesis.Specifications;
|
||||
using Microsoft.ProgramSynthesis.VersionSpace;
|
||||
|
||||
|
@ -20,51 +22,60 @@ namespace ProseSample
|
|||
{
|
||||
public static Grammar LoadGrammar(string grammarFile, params string[] prerequisiteGrammars)
|
||||
{
|
||||
foreach (string prerequisite in prerequisiteGrammars)
|
||||
{
|
||||
var buildResult = DSLCompiler.Compile(prerequisite, $"{prerequisite}.xml");
|
||||
if (buildResult.HasErrors)
|
||||
{
|
||||
WriteColored(ConsoleColor.Magenta, buildResult.TraceDiagnostics);
|
||||
return null;
|
||||
}
|
||||
foreach (string prerequisite in prerequisiteGrammars) {
|
||||
var options = new CompilerOptions {
|
||||
InputGrammar = prerequisite,
|
||||
Output = Path.GetFileNameWithoutExtension(prerequisite) + ".Language.dll",
|
||||
Verbosity = Verbosity.Normal
|
||||
};
|
||||
var buildResult = DSLCompiler.Compile(options);
|
||||
if (!buildResult.HasErrors) continue;
|
||||
WriteColored(ConsoleColor.Magenta, buildResult.TraceDiagnostics);
|
||||
return null;
|
||||
}
|
||||
|
||||
var compilationResult = DSLCompiler.LoadGrammarFromFile(grammarFile);
|
||||
if (compilationResult.HasErrors)
|
||||
{
|
||||
var compilationResult = DSLCompiler.ParseGrammarFromFile(grammarFile);
|
||||
if (compilationResult.HasErrors) {
|
||||
WriteColored(ConsoleColor.Magenta, compilationResult.TraceDiagnostics);
|
||||
return null;
|
||||
}
|
||||
if (compilationResult.Diagnostics.Count > 0)
|
||||
{
|
||||
if (compilationResult.Diagnostics.Count > 0) {
|
||||
WriteColored(ConsoleColor.Yellow, compilationResult.TraceDiagnostics);
|
||||
}
|
||||
|
||||
return compilationResult.Value;
|
||||
}
|
||||
|
||||
public static ProgramNode Learn(Grammar grammar, Spec spec)
|
||||
public static ProgramNode Learn(Grammar grammar, Spec spec,
|
||||
Feature<double> scoreFeature, DomainLearningLogic witnessFunctions)
|
||||
{
|
||||
var engine = new SynthesisEngine(grammar, new SynthesisEngine.Config
|
||||
{
|
||||
UseThreads = false,
|
||||
LogListener = new LogListener(),
|
||||
});
|
||||
var engine =
|
||||
new SynthesisEngine(grammar,
|
||||
new SynthesisEngine.Config
|
||||
{
|
||||
UseThreads = false,
|
||||
Strategies = new ISynthesisStrategy[]
|
||||
{
|
||||
new EnumerativeSynthesis(),
|
||||
new DeductiveSynthesis(witnessFunctions),
|
||||
},
|
||||
LogListener = new LogListener(),
|
||||
});
|
||||
ProgramSet consistentPrograms = engine.LearnGrammar(spec);
|
||||
engine.Configuration.LogListener.SaveLogToXML("learning.log.xml");
|
||||
|
||||
//foreach (ProgramNode p in consistentPrograms.RealizedPrograms) {
|
||||
// Console.WriteLine(p);
|
||||
//}
|
||||
/*foreach (ProgramNode p in consistentPrograms.RealizedPrograms)
|
||||
{
|
||||
Console.WriteLine(p);
|
||||
}*/
|
||||
|
||||
ProgramNode bestProgram = consistentPrograms.TopK("Score").FirstOrDefault();
|
||||
ProgramNode bestProgram = consistentPrograms.TopK(scoreFeature).FirstOrDefault();
|
||||
if (bestProgram == null)
|
||||
{
|
||||
WriteColored(ConsoleColor.Red, "No program :(");
|
||||
return null;
|
||||
}
|
||||
var score = bestProgram["Score"];
|
||||
var score = bestProgram.GetFeatureValue(scoreFeature);
|
||||
WriteColored(ConsoleColor.Cyan, $"[score = {score:F3}] {bestProgram}");
|
||||
return bestProgram;
|
||||
}
|
||||
|
@ -88,7 +99,7 @@ namespace ProseSample
|
|||
{
|
||||
string content = File.ReadAllText(filename);
|
||||
Match[] examples = ExampleRegex.Matches(content).Cast<Match>().ToArray();
|
||||
document = StringRegion.Create(content.Replace("}", "").Replace("{", ""));
|
||||
document = RegionLearner.CreateStringRegion(content.Replace("}", "").Replace("{", ""));
|
||||
var result = new List<StringRegion>();
|
||||
for (int i = 0, shift = -1; i < examples.Length; i++, shift -= 2)
|
||||
{
|
||||
|
|
|
@ -1,20 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Antlr4" version="4.3.0" targetFramework="net452" />
|
||||
<package id="Antlr4.Runtime" version="4.3.0" targetFramework="net452" />
|
||||
<package id="Antlr4.Runtime" version="4.5.3" targetFramework="net452" />
|
||||
<package id="CsQuery" version="1.3.5-beta5" targetFramework="net452" />
|
||||
<package id="Ix-Main" version="1.2.5" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis" version="1.0.0" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.Analyzers" version="1.0.0" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.Common" version="1.0.0" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.CSharp" version="1.0.0" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.CSharp.Workspaces" version="1.0.0" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.VisualBasic" version="1.0.0" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.VisualBasic.Workspaces" version="1.0.0" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.Workspaces.Common" version="1.0.0" targetFramework="net452" />
|
||||
<package id="Microsoft.Composition" version="1.0.27" targetFramework="net452" />
|
||||
<package id="Microsoft.Experimental.Collections" version="1.0.3-alpha" targetFramework="net452" />
|
||||
<package id="Microsoft.ProgramSynthesis" version="0.1.1-preview-1" targetFramework="net452" />
|
||||
<package id="System.Collections.Immutable" version="1.1.36" targetFramework="net452" />
|
||||
<package id="System.Reflection.Metadata" version="1.0.21" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis" version="1.3.2" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.Analyzers" version="1.1.0" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.Common" version="1.3.2" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.CSharp" version="1.3.2" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.CSharp.Workspaces" version="1.3.2" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.VisualBasic" version="1.3.2" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.VisualBasic.Workspaces" version="1.3.2" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeAnalysis.Workspaces.Common" version="1.3.2" targetFramework="net452" />
|
||||
<package id="Microsoft.Composition" version="1.0.30" targetFramework="net452" />
|
||||
<package id="Microsoft.ProgramSynthesis" version="1.0.2" targetFramework="net452" />
|
||||
<package id="Microsoft.ProgramSynthesis.Compiler" version="1.0.2" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
|
||||
<package id="System.Collections" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Collections.Immutable" version="1.3.1" targetFramework="net452" />
|
||||
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Globalization" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Interactive" version="3.1.1" targetFramework="net452" />
|
||||
<package id="System.Linq" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Reflection.Metadata" version="1.4.2" targetFramework="net452" />
|
||||
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Runtime" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Threading" version="4.3.0" targetFramework="net452" />
|
||||
</packages>
|
|
@ -0,0 +1,60 @@
|
|||
Alex Aiken, {Stanford University}, USA
|
||||
Matthias Blume, {Google}, USA
|
||||
Gilles Barthe, IMDEA Software, Spain
|
||||
Lars Birkedal, IT U. of Copenhagen, Denmark
|
||||
Hans-J. Boehm, HP Labs, USA
|
||||
Avik Chaudhuri, Adobe Systems, USA
|
||||
Swarat Chaudhuri, Rice University, USA
|
||||
Derek Dreyer, MPI-SWS, Germany
|
||||
Michael Emmi, Univ. Paris Diderot, France
|
||||
Jérôme Feret, INRIA, France
|
||||
Cédric Fournet, Microsoft Research, UK
|
||||
Daniel Frampton, Australian National U., Australia
|
||||
Simon Gay, University of Glasgow, UK
|
||||
Giorgio Ghelli, Università di Pisa, Italy
|
||||
Benjamin Goldberg, New York University, USA
|
||||
Robert Grimm, New York University, USA
|
||||
Vineet Gupta, Google, USA
|
||||
Chris Hawblitzel, Microsoft Research, USA
|
||||
Jonathan Hayman, INRIA, France
|
||||
Michael Hicks, University of Maryland, USA
|
||||
Martin Hofmann, Ludwig-Maximilians U., Germany
|
||||
Ranjit Jhala, University of California, San Diego, USA
|
||||
K. Rustan M. Leino, Microsoft Research, USA
|
||||
Sorin Lerner, University of California, San Diego, USA
|
||||
Francesca Levi, Università di Pisa, Italy
|
||||
Yitzhak Mandelbaum, SEI-CMU, USA
|
||||
Damien Massé, U. de Bretagne Occidentale, France
|
||||
Isabella Mastroeni, Università di Verona, Italy
|
||||
Maged M. Michael, IBM Research, USA
|
||||
Jan Midtgaard, Aarhus University, Denmark
|
||||
Todd Millstein, Univ. of California, Los Angeles, USA
|
||||
Greg Morrisett, Harvard University, USA
|
||||
Leonardo de Moura, Microsoft Research, USA
|
||||
Andrew C. Myers, Cornell University, USA
|
||||
George Necula, Univ. of California, Berkeley, USA
|
||||
Tamiya Onodera, IBM Research, Japan
|
||||
Jens Palsberg, Univ. of California, Los Angeles, USA
|
||||
Prakash Panangaden, McGill University, Canada
|
||||
Erez Petrank, Technion, Israel
|
||||
Andreas Podelski, University of Freiburg, Germany
|
||||
François Pottier, INRIA, France
|
||||
Maurizio Proietti, CNR, Italy
|
||||
German Puebla, Univ. Politecnica de Madrid, Spain
|
||||
Martin C. Rinard, MIT, USA
|
||||
Xavier Rival, INRIA, France
|
||||
Sukyoung Ryu, KAIST, Korea
|
||||
Francesca Scozzari, Univ. di Chieti-Pescara, Italy
|
||||
Jeremy G. Siek, Univ. of Colorado, Boulder, USA
|
||||
Armando Solar-Lezama, MIT, USA
|
||||
James Stichnoth, Intel, USA
|
||||
Eijiro Sumii, Tohoku University, Japan
|
||||
Tachio Terauchi, Nagoya University, Japan
|
||||
Ashish Tiwari, SRI International, USA
|
||||
Viktor Vafeiadis, MPI-SWS, Germany
|
||||
David Van Horn, Northeastern University, USA
|
||||
Arnaud Venet, NASA Ames Research Center, USA
|
||||
Janis Voigtländer, University of Bonn, Germany
|
||||
Mitchell Wand, Northeastern University, USA
|
||||
Eran Yahav, Technion, Israel
|
||||
Francesco Zappa Nardelli, INRIA, France
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.24720.0
|
||||
VisualStudioVersion = 14.0.25123.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProseSample", "ProgramSynthesis\ProseSample\ProseSample.csproj", "{C7FC4D3C-3CAE-42B9-AFF9-83CB07A7872F}"
|
||||
EndProject
|
||||
|
|
Загрузка…
Ссылка в новой задаче