I'm trying to parse N3 DBpedia dump file using SemWeb. Here is my simple code:
Imports SemWeb
…
Dim store As New MemoryStore
Dim sr As New System.IO.StreamReader(chunkFile)
store.Import(New N3Reader(sr))
When I'm parsing the chunk file (which includes http://www.georss.org/georss/point predicates), I get this exception:
System.OverflowException: Value was either too large or too small for an Int32.
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.Xml.XmlConvert.ToInt32(String s)
at SemWeb.Literal.ParseValue()
at SemWeb.RdfReader.ValidateLiteral(Literal literal)
at SemWeb.N3Reader.ReadToken(MyReader source, ParseContext context)
at SemWeb.N3Reader.ReadResource2(ParseContext context, Boolean allowDirective, Boolean& reverse, Boolean& forgetBNode)
at SemWeb.N3Reader.ReadResource(ParseContext context, Boolean allowDirective, Boolean& reverse, Boolean& forgetBNode)
at SemWeb.N3Reader.ReadObject(Resource subject, Entity predicate, ParseContext context, Boolean reverse)
at SemWeb.N3Reader.ReadPredicate(Resource subject, ParseContext context)
at SemWeb.N3Reader.ReadPredicates(Resource subject, ParseContext context)
at SemWeb.N3Reader.ReadStatement(ParseContext context)
at SemWeb.N3Reader.Select(StatementSink store)
at SemWeb.MemoryStore.StoreImpl.Import(StatementSource source)
at SemWeb.Store.Import(StatementSource source)
at ConsoleApplication2.Module1.SaveToDB(String chunkFilePath) in D:\ConsoleApplication2\ConsoleApplication2\Module1.vb:line 31
As I downloaded the file from DBPedia, it seems that they could not have any exception (they've been used many times by other parsers). Unfortunately, SemWeb does not provide more detail about the line which makes the exception, so I can't find the exact line(s) which causes the exception. Is there any way to solve it?