I want to extract the date/time from the sentence and am new to this NLP text process. I tried to execute the SUTime C# sample mentioned, But it throws the exception. and here is the exception trace.
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:
any ideas to fix this ?