Hi Uros,
I was able to run the MappingExtractor
on srwiki-20131108-pages-articles.xml.bz2
What I did:
- Changed Namespace.scala to
val map = Map(
"en"->204,"de"->208,"fr"->210,"it"->212,"es"->214,"nl"->216,"pt"->218,"pl"->220,"ru"->222,
"cs"->224,"ca"->226,"bn"->228,"hi"->230,"ja"->232,"zh"->236,"hu"->238,"ko"->242,"tr"->246,
"ar"->250,"id"->254,"bg"->264,"sl"->268,"eu"->272,"eo"->274,"et"->282,"hr"->284,"el"->304,
"ur"->378,"ga"->396,*"sr"->398*
)
- Edited the Mapping_sr.xml file you showed us in the following points:
1) <title>Mapping sr:Biografija-lat</title> *(make sure there is no newline
between Mapping and the rest of the text in the title node)*
2) <ns>398</ns> *(used the same namespace number set in Namespace.scala)*
I had an exception (java.util.concurrent.RejectedExecutionException) when I
started the extraction but I only had to restart it and it completed in
about 3 minutes.
I am currently investigating the exception.
Cheers
Andrea
2013/11/21 Uros Milosevic <[email protected]>
> Hi Andrea,
>
> Thanks for the prompt reply. Unfortunately, that didn't help. One thing I
> noticed at run time (after I modified Namespace.scala) is the "Nothing to
> compile - all classes are up to date" line in the log, which looks odd to
> me. Perhaps I should recompile manually (just shooting in the dark here)?
>
> Best,
> Uros
>
> > Hi Uros,
> >
> > this should be caused by the fact that "sr" language is not set
> > here org.dbpedia.extraction.wikiparser.NamespaceBuilder#map (line 71).
> > Please try adding "sr" to the map with a fictional namespace number, e.g.
> > :
> >
> > val map = Map(
> >
> >
> "en"->204,"de"->208,"fr"->210,"it"->212,"es"->214,"nl"->216,"pt"->218,"pl"->220,"ru"->222,
> >
> >
> "cs"->224,"ca"->226,"bn"->228,"hi"->230,"ja"->232,"zh"->236,"hu"->238,"ko"->242,"tr"->246,
> >
> >
> "ar"->250,"id"->254,"bg"->264,"sl"->268,"eu"->272,"eo"->274,"et"->282,"hr"->284,"el"->304,
> > "ur"->378,"ga"->396*, "sr"->398*
> > )
> >
> > Cheers
> > Andrea
> >
> >
> > 2013/11/20 Uros Milosevic <[email protected]>
> >
> >> Hi all,
> >>
> >> Sorry for the not so descriptive message subject. I can successfully run
> >> the extraction framework with only the label extractor on. If I add the
> >> mapping extractor and throw in a sample mapping for Serbian (single
> >> infobox template), the framework crashes. More info below:
> >>
> >> Nov 20, 2013 4:42:53 PM
> >> org.dbpedia.extraction.ontology.io.OntologyReader
> >> read
> >> INFO: Ontology loaded
> >> Nov 20, 2013 4:42:53 PM org.dbpedia.extraction.mappings.MappingsLoader$
> >> load
> >> INFO: Loading mappings (sr)
> >> java.lang.reflect.InvocationTargetException
> >> 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:601)
> >> at
> >> org_scala_tools_maven_executions.MainHelper.runMain(MainHelper.java:161)
> >> at
> >>
> >>
> org_scala_tools_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26)
> >> Caused by: java.lang.reflect.InvocationTargetException
> >> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> >> Method)
> >> at
> >>
> >>
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> >> at
> >>
> >>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> >> at
> >> java.lang.reflect.Constructor.newInstance(Constructor.java:525)
> >> at
> >>
> >>
> org.dbpedia.extraction.mappings.CompositeExtractor$$anonfun$1.apply(CompositeExtractor.scala:25)
> >> at
> >>
> >>
> org.dbpedia.extraction.mappings.CompositeExtractor$$anonfun$1.apply(CompositeExtractor.scala:25)
> >> at
> >>
> >>
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
> >> at
> >>
> >>
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
> >> at
> >>
> >>
> scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
> >> at scala.collection.immutable.List.foreach(List.scala:76)
> >> at
> >> scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
> >> at scala.collection.immutable.List.map(List.scala:76)
> >> at
> >>
> >>
> org.dbpedia.extraction.mappings.CompositeExtractor$.load(CompositeExtractor.scala:25)
> >> at
> >> org.dbpedia.extraction.dump.extract.ConfigLoader.org
> >>
> $dbpedia$extraction$dump$extract$ConfigLoader$$createExtractionJob(ConfigLoader.scala:103)
> >> at
> >>
> >>
> org.dbpedia.extraction.dump.extract.ConfigLoader$$anonfun$getExtractionJobs$1.apply(ConfigLoader.scala:36)
> >> at
> >>
> >>
> org.dbpedia.extraction.dump.extract.ConfigLoader$$anonfun$getExtractionJobs$1.apply(ConfigLoader.scala:36)
> >> at scala.collection.Iterator$$anon$19.next(Iterator.scala:401)
> >> at scala.collection.Iterator$class.foreach(Iterator.scala:772)
> >> at
> >> scala.collection.Iterator$$anon$19.foreach(Iterator.scala:399)
> >> at
> >>
> >>
> scala.collection.IterableViewLike$Transformed$class.foreach(IterableViewLike.scala:41)
> >> at
> >>
> >>
> scala.collection.IterableViewLike$$anon$3.foreach(IterableViewLike.scala:80)
> >> at
> >>
> org.dbpedia.extraction.dump.extract.Extraction$.main(Extraction.scala:36)
> >> at
> >> org.dbpedia.extraction.dump.extract.Extraction.main(Extraction.scala)
> >> ... 6 more
> >> Caused by: java.util.NoSuchElementException: key not found:
> >> wiki=sr,locale=sr
> >> at scala.collection.MapLike$class.default(MapLike.scala:225)
> >> at scala.collection.immutable.HashMap.default(HashMap.scala:38)
> >> at scala.collection.MapLike$class.apply(MapLike.scala:135)
> >> at scala.collection.immutable.HashMap.apply(HashMap.scala:38)
> >> at
> >>
> >>
> org.dbpedia.extraction.dump.extract.ConfigLoader$$anon$1._mappingPageSource(ConfigLoader.scala:61)
> >> at
> >>
> >>
> org.dbpedia.extraction.dump.extract.ConfigLoader$$anon$1.mappingPageSource(ConfigLoader.scala:76)
> >> 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:601)
> >> at
> >>
> >>
> org.dbpedia.extraction.mappings.MappingsLoader$.load(MappingsLoader.scala:33)
> >> at
> >>
> >>
> org.dbpedia.extraction.dump.extract.ConfigLoader$$anon$1._mappings(ConfigLoader.scala:80)
> >> at
> >>
> >>
> org.dbpedia.extraction.dump.extract.ConfigLoader$$anon$1.mappings(ConfigLoader.scala:82)
> >> 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:601)
> >> at
> >>
> >>
> org.dbpedia.extraction.mappings.MappingExtractor.<init>(MappingExtractor.scala:19)
> >> ... 29 more
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [ERROR] BUILD ERROR
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] wrap: org.apache.commons.exec.ExecuteException: Process exited
> >> with
> >> an error: 240(Exit value: 240)
> >>
> >>
> >>
> >> And here's my Mapping_sr.xml:
> >>
> >> <?xml version="1.0" encoding="UTF-8"?><mediawiki
> >> xmlns="http://www.mediawiki.org/xml/export-0.6/"><page><title>Mapping
> >>
> >>
> sr:Biografija-lat</title><ns>212</ns><id>4331</id><revision><id>16999</id><timestamp>2012-03-21T15:31:05Z</timestamp><text>{{TemplateMapping
> >> | mapToClass = Person
> >> | mappings =
> >> <!-- basic parameter -->
> >> {{PropertyMapping | templateProperty = ime | ontologyProperty =
> >> foaf:name }}
> >> {{PropertyMapping | templateProperty = prezime |
> >> ontologyProperty =
> >> foaf:surname }}
> >> {{PropertyMapping | templateProperty = dan_rođenja |
> >> ontologyProperty = birthDate }}
> >> {{PropertyMapping | templateProperty = godina_rođenja |
> >> ontologyProperty = birthYear }}
> >> {{PropertyMapping | templateProperty = mesto_smrti |
> >> ontologyProperty =
> >> deathPlace }}
> >> {{PropertyMapping | templateProperty = dan_smrti |
> >> ontologyProperty =
> >> deathDate }}
> >> {{PropertyMapping | templateProperty = godina_smrti |
> >> ontologyProperty =
> >> deathYear }}
> >> {{PropertyMapping | templateProperty = slika | ontologyProperty
> >> =
> >> foaf:depiction}}
> >> }}</text></revision></page></mediawiki>
> >>
> >>
> >> I'd be very grateful for any assistance!
> >>
> >> Best,
> >> Uros
> >>
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> Shape the Mobile Experience: Free Subscription
> >> Software experts and developers: Be at the forefront of tech innovation.
> >> Intel(R) Software Adrenaline delivers strategic insight and
> >> game-changing
> >> conversations that shape the rapidly evolving mobile landscape. Sign up
> >> now.
> >>
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> >> _______________________________________________
> >> Dbpedia-developers mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/dbpedia-developers
> >>
> >
>
>
>
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Dbpedia-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-developers