Hi Jean,
In general, there is no real standard way to fill in infobox values. It can
contain numbers, links and even other templates. This lack of regularity
makes parsing it a pain.

For example, in English, the field is filled like this:

|lat_deg       = 50 |lat_min = 44 |lat_sec = 02.37
|lon_deg       = 7 |lon_min = 5 |lon_sec = 59.33

While in German, it is like this:

|Breitengrad       = 50/44/02.37/N
|Längengrad        = 7/5/59.33/E

There seems to exist already a GeoCoordinates parser in the DEF, that gets
triggered when you use GeocoordinatesMapping instead of a PropertyMapping.
http://mappings.dbpedia.org/index.php/Template:GeocoordinatesMapping

You would probably have to extend the GeoCoordinateParser to include this
new way to express lat/log
http://dbpedia.hg.sourceforge.net/hgweb/dbpedia/extraction_framework/file/febe0119845a/core/src/main/scala/org/dbpedia/extraction/dataparser/GeoCoordinateParser.scala

Or you can try to convince Jona to extend it for you. :)

Cheers,
Pablo

PS: This answer was written with help from Anja, Robert and Jona.

On Wed, Feb 15, 2012 at 3:30 PM, Jean Gould <[email protected]> wrote:

> Hi Pablo,
>
> > Done. Happy mapping!
>
> Thanks!
>
> I changed my first two mappings and tested them. When you go to
> http://de.wikipedia.org/wiki/Bonn you see following entry:
> {{Begriffsklärungshinweis}}
> {{Infobox Gemeinde in Deutschland
> |Art               = Stadt
> |Wappen            = Wappen-stadt-bonn.svg
> |Breitengrad       = 50/44/02.37/N
> |Längengrad        = 7/5/59.33/E
> ...
>
> I mapped Breitengrad to latitude and Längengrad to longitude. But the
> parser does something wrong and takes only the first number for the
> mapping. In this case 50 and 7. I looked also in the generated nt- and
> nq-files and see that the data is wrong there, too. I guess it is treated
> as a numeric field, where it should be treated as a string which needs to
> be parsed sometimes.
>
>   Jean
>
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to