Hi Jona ,
> > i noticed that the full version of IOUtils file is in the dump branch
> unlike
> > the master branch
> >
> https://github.com/dbpedia/extraction-framework/blob/dump/core/src/main/scala/org/dbpedia/extraction/util/IOUtils.scala
> >
> > so i pulled that file exclusively from the dump branch merged it to the
> > local branch
> > i written small test code to utilize the IOUtils when compiling i faced
> the
> > following errors :
> >
> > object compress is not a member of package org.apache.commons
> > import
> >
> org.apache.commons.compress.compressors.bzip2.{BZip2CompressorInputStream,BZip2CompressorOutputStream}
> > ^
>
> That's because on the master branch, core/pom.xml does not declare the
> dependency on commons-compress.
>
>
in the master branch , it was declared in the outer Pom.xml file , isn't it
supposed to define global dependencies ?
it worked when i added it in the core/pom.xml
> > value charSet is not a member of java.nio.charset.Charset
> > def writer(file: FileLike[_], charset: Charset = Codec.UTF8.charSet):
> > Writer =
> > ^
> > value charSet is not a member of java.nio.charset.Charset
> > def reader(file: FileLike[_], charset: Charset = Codec.UTF8.charSet):
> > Reader =
>
> That's because the Scala people do not care much about backwards
> compatibility (and neither do I, I must admit).
>
> In Scala 2.9.2 (used on master branch), Codec.UTF8 had type Charset:
>
> http://www.scala-lang.org/api/2.9.2/index.html#scala.io.Codec$
> final val UTF8: Charset
>
> In Scala 2.10.1 (used on dump branch), Codec.UTF8 has type Codec:
>
> http://www.scala-lang.org/api/2.10.1/index.html#scala.io.Codec$
> final val UTF8: Codec
>
>
that's correct the Codec.UTF-8 is of type Codec in scala.10 , but this
wasn't the problem specifically
actually i was still using scala 2.9 (depending on the master pom file)
the problem was that Codec.UTF-8 didnt have charSet member
this worked fine with me (scala 2.9):
def writer(file: FileLike[_], charset: Charset = Codec.UTF8): Writer =
and i guess it should be for scala 2.10 :
def writer(file: FileLike[_], charset: Codec = Codec.UTF8): Writer =
> it seems that there's something not included in the packages
> apache.commons
> > and Code.UTF-8
> > should i pull the whole dump branch from Github ?
>
> You could try that. It would mean that your code is incompatible with
> the master branch until we merge my changes from the dump branch. Not
> terribly bad, but not very good either.
>
> or this is because
> > another thing ?
>
> You could also just copy & paste the new methods from IOUtils.scala to
> your own class and add the commons-compress dependency to your
> pom.xml
merging would create conflicts , even it would be a little messy but i'd
copy the methods
even selectively pulling new updates in the core/IOUtils.scala would make
conflicts because there's other IOUtils object in the scripts in the master
branch, so let's copy the methods for now
*one last Question : *
i noticed IOUtils.inputStream method takes FileLike abstract object
i used the implemented class RichFile , didn't know if that's it's main
function but it worked fine , would that be a problem?
val file = new RichFile(fileName)
val in = org.dbpedia.extraction.util.IOUtils.inputStream(file)
val lines = Source.fromInputStream(in,"UTF-8").getLines()
-------------------------------------------------
Hady El-Sahar
Research Assistant
Center of Informatics Sciences | Nile University<http://nileuniversity.edu.eg/>
email : [email protected]
Phone : +2-01220887311
http://hadyelsahar.me/
<http://www.linkedin.com/in/hadyelsahar>
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Dbpedia-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-developers