uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Klügl <peter.klu...@averbis.com>
Subject Re: XCASParsingException while using DKPro with UIMA RUTA for POS tagging
Date Wed, 28 Feb 2018 10:41:46 GMT
Hi,


this error occurs if you try to open the CAS Editor and the selected
type system description does not contain all types present in the CAS.


There are several ways to solve the problem.

Probably, the type system description that was selected is the
description generated for the Ruta script. Then, you can simply import
the required types in your script. This is at least
de.tudarmstadt.ukp.dkpro.core.api.metadata.type.TagsetDescription in
your use case. If you use a different type system, you need to add it there.

If you do not care about those other types, you can tell the CAS Editor
to ignore them.

Open Menu->Window->Preferences->UIMA Cas Editor->Annotation Editor

And check the option "Load CAS leniently". Please mind that you will
lose annotations if you save a modified CAS.


Best,


Peter



Am 28.02.2018 um 09:19 schrieb Ruwini Wijesiri:
> Hi,
>
> I am new to using UIMA Ruta and I have been trying to get the POS tags
> using DKPRo. I tried POS tagging by refering to the german novel
> example[1], but i get an error saying editor couldn't be initilized due to
> the following exception;
>
> org.apache.uima.UIMARuntimeException
>> at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:368)
>> at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:312)
>> at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:193)
>> at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:218)
>> at
>> org.apache.uima.caseditor.editor.DocumentUimaImpl.setContent(DocumentUimaImpl.java:248)
>> at
>> org.apache.uima.caseditor.editor.DocumentUimaImpl.<init>(DocumentUimaImpl.java:100)
>> at
>> org.apache.uima.caseditor.ide.DefaultCasDocumentProvider.createDocument(DefaultCasDocumentProvider.java:405)
>> at
>> org.apache.uima.caseditor.editor.TextDocumentProvider.createDocument(TextDocumentProvider.java:78)
>> at
>> org.eclipse.ui.texteditor.AbstractDocumentProvider.createElementInfo(AbstractDocumentProvider.java:327)
>> at
>> org.apache.uima.caseditor.editor.TextDocumentProvider.createElementInfo(TextDocumentProvider.java:110)
>> at
>> org.eclipse.ui.texteditor.AbstractDocumentProvider.connect(AbstractDocumentProvider.java:392)
>> at
>> org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4178)
>> at
>> org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:257)
>> at
>> org.apache.uima.caseditor.editor.AnnotationEditor.doSetInput(AnnotationEditor.java:837)
>> at
>> org.eclipse.ui.texteditor.AbstractTextEditor$5.run(AbstractTextEditor.java:3154)
>> at
>> org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437)
>> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353)
>> at
>> org.eclipse.ui.internal.WorkbenchWindow$14.run(WorkbenchWindow.java:2195)
>> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
>> at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2191)
>> at
>> org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3172)
>> at
>> org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3197)
>> at
>> org.apache.uima.caseditor.editor.AnnotationEditor.init(AnnotationEditor.java:594)
>> at
>> org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:362)
>> at
>> org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:333)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at
>> org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
>> at
>> org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:990)
>> at
>> org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:955)
>> at
>> org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:124)
>> at
>> org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:399)
>> at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:318)
>> at
>> org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
>> at
>> org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:105)
>> at
>> org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:74)
>> at
>> org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:56)
>> at
>> org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129)
>> at
>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:992)
>> at
>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:661)
>> at
>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:767)
>> at
>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:738)
>> at
>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:732)
>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
>> at
>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:716)
>> at
>> org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceImpl.java:104)
>> at
>> org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
>> at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233)
>> at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144)
>> at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889)
>> at
>> org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212)
>> at
>> org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
>> at
>> org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201)
>> at
>> org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
>> at
>> org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
>> at
>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>> at
>> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
>> at
>> org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
>> at
>> org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
>> at
>> org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
>> at
>> org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52)
>> at
>> org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60)
>> at
>> org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
>> at
>> org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:173)
>> at
>> org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:620)
>> at
>> org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:584)
>> at
>> org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:769)
>> at
>> org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:401)
>> at
>> org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1188)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3261)
>> at org.eclipse.ui.internal.WorkbenchPage.access$25(WorkbenchPage.java:3176)
>> at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:3158)
>> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3153)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3117)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3107)
>> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:563)
>> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:518)
>> at
>> org.eclipse.dltk.internal.ui.editor.EditorUtility.openInEditor(EditorUtility.java:403)
>> at
>> org.eclipse.dltk.internal.ui.editor.EditorUtility.openInEditor(EditorUtility.java:155)
>> at
>> org.eclipse.dltk.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:44)
>> at org.eclipse.dltk.ui.actions.OpenAction.run(OpenAction.java:264)
>> at org.eclipse.dltk.ui.actions.OpenAction.run(OpenAction.java:245)
>> at
>> org.eclipse.dltk.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:254)
>> at
>> org.eclipse.dltk.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:232)
>> at
>> org.eclipse.dltk.internal.ui.scriptview.ScriptExplorerActionGroup.handleOpen(ScriptExplorerActionGroup.java:326)
>> at
>> org.eclipse.dltk.internal.ui.scriptview.ScriptExplorerPart.lambda$2(ScriptExplorerPart.java:675)
>> at
>> org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:851)
>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
>> at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
>> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
>> at
>> org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:848)
>> at
>> org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1163)
>> at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:273)
>> at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:268)
>> at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:308)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
>> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
>> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4238)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3817)
>> at
>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
>> at
>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
>> at
>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
>> at
>> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
>> at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
>> at
>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
>> at
>> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
>> at
>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
>> at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
>> Caused by: XCASParsingException: Error parsing XCAS or XMI-CAS from source
>> <unknown> at line <unknown>, column <unknown>: unknown type:
>> de.tudarmstadt.ukp.dkpro.core.api.metadata.type.TagsetDescription.
>> at
>> org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.createException(XmiCasDeserializer.java:1635)
>> at
>> org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.createException(XmiCasDeserializer.java:1657)
>> at
>> org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.readFS(XmiCasDeserializer.java:490)
>> at
>> org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.startElement(XmiCasDeserializer.java:409)
>> at
>> org.apache.uima.util.XmlCasDeserializer$XmlCasDeserializerHandler.startElement(XmlCasDeserializer.java:150)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>> Source)
>> at
>> org.apache.uima.util.XmlCasDeserializer.deserializeR(XmlCasDeserializer.java:111)
>> at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:366)
>> ... 123 more
>>
>>
> The script i tried to run is as follow;
>
> IMPORT PACKAGE de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos FROM
>> desc.type.POS AS pos;
>> IMPORT de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Lemma FROM
>> desc.type.LexicalUnits;
>> UIMAFIT de.tudarmstadt.ukp.dkpro.core.opennlp.OpenNlpSegmenter;
>> UIMAFIT de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordPosTagger;
>> UIMAFIT de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordLemmatizer;
>> uima.tcas.DocumentAnnotation{-CONTAINS(pos.POS)} -> {
>>     uima.tcas.DocumentAnnotation{-> SETFEATURE("language", "en")};
>>     EXEC(OpenNlpSegmenter);
>>     EXEC(StanfordPosTagger, {pos.POS});
>>     };
>
>
>
> I couldn't find anyway to resolve this issue and im very new to RUTA. I'd
> greatful if someone could help me out with this.
>
> [1].https://github.com/pkluegl/ruta/tree/master/ruta-german-novel-with-dkpro
>
> Thanks in advance,
> Regards,
> Ruwini
>

-- 
Peter Klügl
R&D Text Mining/Machine Learning

Averbis GmbH
Tennenbacher Str. 11
79106 Freiburg
Germany

Fon: +49 761 708 394 0
Fax: +49 761 708 394 10
Email: peter.kluegl@averbis.com
Web: https://averbis.com

Headquarters: Freiburg im Breisgau
Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080
Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó


Mime
View raw message