在java中使用Stanford Core NLP时出错(tokensregex.parser.TokenMgrError)

在java中使用Stanford Core NLP时出错(tokensregex.parser.TokenMgrError),java,nlp,stanford-nlp,stanford-parser,Java,Nlp,Stanford Nlp,Stanford Parser,我得到了这个错误 错误:edu.stanford.nlp.ling.tokensregex.parser.TokenMgrError:遇到“\”,在“:”之后 我使用的是2016-10-31最新版本的斯坦福核心nlp, 这是我的密码 我得到的例外是: Exception in thread "main" java.lang.RuntimeException: When parsing Here are some of Michigan's premier attractions (althoug

我得到了这个错误 错误:edu.stanford.nlp.ling.tokensregex.parser.TokenMgrError:遇到“\”,在“:”之后

我使用的是2016-10-31最新版本的斯坦福核心nlp, 这是我的密码

我得到的例外是:

Exception in thread "main" java.lang.RuntimeException: When parsing Here are some of Michigan's premier attractions (although of course it's by no means complete) - or intended to be, for that matter.Porcupine Mountains 
At the western corner of the northern peninsula of Michigan you'll find Porcupine Mountains Wilderness State Park that is a true gem for a great family vacation , and the largest State Park in Michigan too.It has many things to offer to families looking for adventure in the great outdoors.And it's accessible during all the seasons of the year.The Park got its name from the Ojibwa Indians, who named the 'small mountains' thus, because, with their tall trees, they looked like crouching porcupines.Visit in the spring as the leaves begin to bud.Call on it in the summer lambing season.Greet it in the Autumn as the leaves begin to fall.Love it in the winter skying season.Its terrain is wild and rugged where it sits at the shoreline of Lake Superior, and inland where it embraces sixty-thousand acres of towering pines and sturdy birches and natural hemlock forests.The rivers teem with various species of trout as they cut through the forests.       edu.stanford.nlp.ling.tokensregex.parser.TokenSequenceParseException: Parsing failed. Error: edu.stanford.nlp.ling.tokensregex.parser.TokenMgrError: Lexical error at line 1, column 26.  Encountered: "\'" (39), after : ""
at edu.stanford.nlp.ling.tokensregex.TokenSequencePattern.compile(TokenSequencePattern.java:192)
at edu.stanford.nlp.ling.tokensregex.TokenSequencePattern.compile(TokenSequencePattern.java:171)

TokenSequencePattern应该是要编译的规则,而不是要在其中查找模式的文本

以下是TokensRegex的一般参考:

  textFeatures = "At the western corner of the northern peninsula of Michigan you'll find Porcupine Mountains Wilderness State Park that is a true gem for a great family vacation , and the largest State Park in Michigan too.It has many things to offer to families looking for adventure in the great outdoors.And it's accessible during all the seasons of the year.The Park got its name from the Ojibwa Indians, who named the 'small mountains' thus, because, with their tall trees, they looked like crouching porcupines.Visit in the spring as the leaves begin to bud.Call on it in the summer lambing season.Greet it in the Autumn as the leaves begin to fall.Love it in the winter skying season.Its terrain is wild and rugged where it sits at the shoreline of Lake Superior, and inland where it embraces sixty-thousand acres of towering pines and sturdy birches and natural hemlock forests.The rivers teem with various species of trout as they cut through the forests."
Exception in thread "main" java.lang.RuntimeException: When parsing Here are some of Michigan's premier attractions (although of course it's by no means complete) - or intended to be, for that matter.Porcupine Mountains 
At the western corner of the northern peninsula of Michigan you'll find Porcupine Mountains Wilderness State Park that is a true gem for a great family vacation , and the largest State Park in Michigan too.It has many things to offer to families looking for adventure in the great outdoors.And it's accessible during all the seasons of the year.The Park got its name from the Ojibwa Indians, who named the 'small mountains' thus, because, with their tall trees, they looked like crouching porcupines.Visit in the spring as the leaves begin to bud.Call on it in the summer lambing season.Greet it in the Autumn as the leaves begin to fall.Love it in the winter skying season.Its terrain is wild and rugged where it sits at the shoreline of Lake Superior, and inland where it embraces sixty-thousand acres of towering pines and sturdy birches and natural hemlock forests.The rivers teem with various species of trout as they cut through the forests.       edu.stanford.nlp.ling.tokensregex.parser.TokenSequenceParseException: Parsing failed. Error: edu.stanford.nlp.ling.tokensregex.parser.TokenMgrError: Lexical error at line 1, column 26.  Encountered: "\'" (39), after : ""
at edu.stanford.nlp.ling.tokensregex.TokenSequencePattern.compile(TokenSequencePattern.java:192)
at edu.stanford.nlp.ling.tokensregex.TokenSequencePattern.compile(TokenSequencePattern.java:171)