Skip to content
This repository has been archived by the owner on May 29, 2020. It is now read-only.

input file path is mis interpreted by MascSlab #25

Open
prassee opened this issue Mar 27, 2014 · 0 comments
Open

input file path is mis interpreted by MascSlab #25

prassee opened this issue Mar 27, 2014 · 0 comments

Comments

@prassee
Copy link

prassee commented Mar 27, 2014

Given the below code to print all sentences under data.txt I have ended up with an exception. The stack trace has also been attached. I could observe from the trace that input file path is misinterpreted.

/home/codeWorld/workspaces/scala-nlp/target/scala-2.10/classes/data-s.xml

object ChalkDemo extends App {
  val url = this.getClass.getResource("/data.txt")
  val slab = MascSlab(url)
  val sentSlab = MascSlab.s(slab)
}

Exception in thread "main" java.io.FileNotFoundException: /home/codeWorld/workspaces/scala-nlp/target/scala-2.10/classes/data-s.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:146)
at java.io.FileInputStream.(FileInputStream.java:101)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:613)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333)
at scala.xml.factory.XMLLoader$class.loadXML(XMLLoader.scala:40)
at scala.xml.XML$.loadXML(XML.scala:57)
at scala.xml.factory.XMLLoader$class.load(XMLLoader.scala:54)
at scala.xml.XML$.load(XML.scala:57)
at chalk.corpora.MascSlab$.s(MascUtil.scala:325)
at com.prassee.chalk.ChalkDemo$delayedInit$body.apply(ChalkDemo.scala:10)
at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
at scala.App$class.main(App.scala:71)
at com.prassee.chalk.ChalkDemo$.main(ChalkDemo.scala:6)
at com.prassee.chalk.ChalkDemo.main(ChalkDemo.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant