diff --git a/NLPHelloWorld/NLPHelloWorld.csproj b/NLPHelloWorld/NLPHelloWorld.csproj index 0f33086..5171e1a 100644 --- a/NLPHelloWorld/NLPHelloWorld.csproj +++ b/NLPHelloWorld/NLPHelloWorld.csproj @@ -13,11 +13,11 @@ - - - - - + + + + + diff --git a/NLPHelloWorldRules/HowToDefinePrefixes.cs b/NLPHelloWorldRules/HowToDefinePrefixes.cs index a4d7dd2..93150b7 100644 --- a/NLPHelloWorldRules/HowToDefinePrefixes.cs +++ b/NLPHelloWorldRules/HowToDefinePrefixes.cs @@ -5,6 +5,8 @@ using AboditNLP.Preposition; using AboditNLP.Question; using AboditNLP.Punctuation; +using AboditNLP.Noun; + namespace NLPHelloWorldRules { @@ -26,7 +28,6 @@ public class Prefix public string OptionalResponsePrefix { get; set; } } - public partial class SampleRules : INLPRule { [ProductionRule] diff --git a/NLPHelloWorldRules/HowToUseAPrefix.cs b/NLPHelloWorldRules/HowToUseAPrefix.cs new file mode 100644 index 0000000..e267b9f --- /dev/null +++ b/NLPHelloWorldRules/HowToUseAPrefix.cs @@ -0,0 +1,19 @@ +using System.Data; +using System.Linq; +using Abodit.Expressions; +using Abodit.Meta; +using AboditNLP; +using AboditNLP.Attributes; + +namespace NLPHelloWorldRules +{ + public partial class SampleRules : INLPRule + { + public NLPActionResult GrammarDumpWithPrefix(Prefix prefix, IAmbiguous tokenAmbiguous) + { + st.Say(prefix.OptionalResponsePrefix); + intent.GrammarDump(st, tokenAmbiguous); + return NLPActionResult.None; + } + } +} diff --git a/NLPHelloWorldRules/NLPHelloWorldRules.csproj b/NLPHelloWorldRules/NLPHelloWorldRules.csproj index 1d9d90a..2020745 100644 --- a/NLPHelloWorldRules/NLPHelloWorldRules.csproj +++ b/NLPHelloWorldRules/NLPHelloWorldRules.csproj @@ -12,9 +12,9 @@ - - - + + +