Hi JC, Zhiwei,
the exception is raised on those pages which have no links.
Unfortunately the JSON value for links is either a JObject with JFields in
it or an empty JArray.
Exceptions can be avoided with
val interLinks = (jsonObjMap \ "links") match {
case JObject(links) => links
case _ => List()
}
Regards
Example of empty links:
<title>Q56106</title>
<ns>0</ns>
<id>58863</id>
<revision>
<id>496822</id>
<parentid>496819</parentid>
<timestamp>2012-11-20T02:11:08Z</timestamp>
<contributor>
<username>Dwaipayanc</username>
<id>5600</id>
</contributor>
<comment>/* wbsetaliases-add-remove:1|en */ swadhinata diwas</comment>
<text
xml:space="preserve">{"label":{"en":"Independence
Day (India)"},"description":{"en":"15 August.
The day India became independent from the United
Kingdom."},"aliases":{"en":["swatantrata
diwas","swadhinata
diwas"]},"links":[],"entity":"q56106"}</text>
<sha1>ik1jxqhj6dwms8lip1drl3jln75se8i</sha1>
<model>wikibase-item</model>
<format>application/json</format>
</revision>
2013/4/12 Andrea Di Menna <[email protected]>
> I will on Monday.
> Anyway I think Zhiwei is using a very old dump from november 2012.
> I'd try with the latest available.
> It is possible the json format was slighlty different from what it is now.
>
> Regards
> Andrea
>
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Dbpedia-gsoc mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-gsoc