SUTime C#示例无效

时间:2017-03-29 07:31:23

标签: c# stanford-nlp

我想从句子中提取日期/时间,并且是这个NLP文本过程的新手。我试图执行提到的SUTime C#sample,但它抛出异常。这是异常追踪。

System.TypeInitializationException was unhandled
HResult=-2146233036
Message=The type initializer for 'edu.stanford.nlp.time.XMLUtils' threw an exception.
Source=stanford-corenlp-3.7.0
TypeName=edu.stanford.nlp.time.XMLUtils
StackTrace:
at edu.stanford.nlp.time.XMLUtils.createElement(String tag)
at edu.stanford.nlp.time.Timex.fromMap(String text, Map map)
at edu.stanford.nlp.time.TimeExpressionExtractorImpl.toCoreMaps(CoreMap , List , TimeIndex )
at edu.stanford.nlp.time.TimeExpressionExtractorImpl.extractTimeExpressionCoreMaps(CoreMap annotation, String docDate, TimeIndex timeIndex)
at edu.stanford.nlp.time.TimeAnnotator.annotate(Annotation annotation)
at edu.stanford.nlp.pipeline.AnnotationPipeline.annotate(Annotation annotation)
at SampleNLP_Standford.Program.Timex(String jarRoot) in C:\Users\user\Documents\visual studio 2015\Projects\SampleNLP_Standford\SampleNLP_Standford\Program.cs:line 102
at SampleNLP_Standford.Program.Main(String[] args) in C:\Users\user\Documents\visual studio 2015\Projects\SampleNLP_Standford\SampleNLP_Standford\Program.cs:line 21
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
HResult=-2146233088
Message (System.Exception)=Provider com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl not found
Message=Provider com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl not found
Source (System.Exception)=IKVM.OpenJDK.XML.API
Source=IKVM.OpenJDK.XML.API
StackTrace (System.Exception)= at javax.xml.parsers.FactoryFinder.newInstance(Class , String , ClassLoader , Boolean , Boolean )
at javax.xml.parsers.FactoryFinder.newInstance(Class , String , ClassLoader , Boolean )
at javax.xml.parsers.FactoryFinder.find(Class , String )
at javax.xml.parsers.DocumentBuilderFactory.newInstance()
at edu.stanford.nlp.time.XMLUtils.createDocument()
at edu.stanford.nlp.time.XMLUtils..cctor()
StackTrace:
at javax.xml.parsers.FactoryFinder.newInstance(Class , String , ClassLoader , Boolean , Boolean )
at javax.xml.parsers.FactoryFinder.newInstance(Class , String , ClassLoader , Boolean )
at javax.xml.parsers.FactoryFinder.find(Class , String )
at javax.xml.parsers.DocumentBuilderFactory.newInstance()
at edu.stanford.nlp.time.XMLUtils.createDocument()
at edu.stanford.nlp.time.XMLUtils..cctor()
InnerException:

要解决这个问题的想法吗?

0 个答案:

没有答案