Return-Path: X-Original-To: apmail-any23-dev-archive@www.apache.org Delivered-To: apmail-any23-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0D87617CDE for ; Mon, 2 Feb 2015 17:11:49 +0000 (UTC) Received: (qmail 46626 invoked by uid 500); 2 Feb 2015 17:11:50 -0000 Delivered-To: apmail-any23-dev-archive@any23.apache.org Received: (qmail 46585 invoked by uid 500); 2 Feb 2015 17:11:49 -0000 Mailing-List: contact dev-help@any23.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@any23.apache.org Delivered-To: mailing list dev@any23.apache.org Delivered-To: moderator for dev@any23.apache.org Received: (qmail 92806 invoked by uid 99); 1 Feb 2015 11:28:02 -0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_FILL_THIS_FORM_SHORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cev.demirkiran@gmail.com designates 209.85.215.41 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=eS0Wb9g4spSTb1/5A5gKL5AfmiPeL/RxV1vJJs/ej44=; b=QjV1WfCNwok5LUa1SEiA+V1Z3dBMbhP7Q0K8cnY5Nu5VAKhuLAUVO3pkHNahFwJ/hB PmwCM7a72a+fdL3Vyu5VFF/2ovrZzld1kZkpWDWm1mQ2sems2C1UJl5TPagWMJ53FZp7 NOA71mGPkQuBUQToAU2Kb5RFH6EZ79ebptfjp0h9+gpE1VYCTM0IL6yWTrfjDliqr2IF M3esf62ZPzmPJqEHLBJXy3stP9S9hGfx3kNUjOLQ37CgjKPLRmeS//rSvXZ2ct/ZjF1W 3MHpljCOvaqKewSNU03moIAgupaR3XBJydHP6MNl7zv8WNuzR9Jw39/AkG6EMFp2RM5A ZdFw== MIME-Version: 1.0 X-Received: by 10.112.225.166 with SMTP id rl6mr14293894lbc.58.1422790010710; Sun, 01 Feb 2015 03:26:50 -0800 (PST) In-Reply-To: References: Date: Sun, 1 Feb 2015 12:26:50 +0100 Message-ID: Subject: Re: a question on CSV to RDF conversion From: Cevahir Demirkiran To: Lewis John Mcgibbney Cc: "dev@any23.apache.org" Content-Type: multipart/alternative; boundary=001a113464202dae8c050e051d89 X-Virus-Checked: Checked by ClamAV on apache.org --001a113464202dae8c050e051d89 Content-Type: text/plain; charset=UTF-8 Hi Lewis; Thanks a lot for your answer. > >1. What is an ExtractionContext? Do I define it above correctly? > No, you've passed in a String which relates to absolutely nothing. You would need to actually name an extractor. You can check out the Javadocs for concrete specification http://any23.apache.org/apidocs/index.html?org/apache/any23/extractor/ExtractionContext.html I am going to try HTTPDocumentSource for sure. This is what I would like to ask exactly. In fact I have already checked the API doc for ExtractionContext, we have *ExtractionContext *(String extractorName, org.openrdf.model.URI documentURI) Now what is String extractorName? Here I passed the name of my extractor variable which is wrong. What do you mean by naming an extractor? What should I pass there? As of URI, I guess it is the URI of the document which I need to convert I guess, which may be something like file://.... Or is it the target document URI? 2015-01-31 21:28 GMT+01:00 Lewis John Mcgibbney : > Hi Cevahir, > > Low hanging fruit here is to run this through our online service. > > http://any23-vm.apache.org > > If you are getting some triples back then you are good. Then you need to > ensure that you can reproduce using some code. > > > >> >Upon running the above code using the sample input provided in the link: >> >http://any23.apache.org/dev-csv-extractor.html >> > >> > >> >I get no output, I mean the outputfile sample.rdf is empty. >> >I checked whether there are any issues however I couldn't see anything. >> > > Did you debug this? I mean this could potentially be the fact that your > path if incorrect. Did you check you are actually reading data from a CSV > file? > > >> > >> > >> >I would be extremely thankful in case you could inform me: I have been >> >searching the web for some info, however all I can get is the javadoc, >> >finally I decided to send an email: >> > > Thank you for coming to the list. CSV extraction has been pretty stable an > untouched for a while now. We are very keen to ensure that the code is > capable of CSV --> RDF conversions. > > In all honestu I would advise you to NOT use the CSV extractor explicitly. > Why don;t you try using the code we provide here > http://any23.apache.org/dev-data-extraction.html > The HTTPDocumentSource can be switched for a DocumentSouce and you can > read your data that way. It also means your code is more flexible and will > save you time in the future when you need to extract from XHTML for example. > > >> > >> > >> >1. What is an ExtractionContext? Do I define it above correctly? >> > > No, you've passed in a String which relates to absolutely nothing. You > would need to actually name an extractor. You can check out the Javadocs > for concrete specification > > http://any23.apache.org/apidocs/index.html?org/apache/any23/extractor/ExtractionContext.html > > >> >2. Where is the error? >> > > I don't think there is an error. I think that nothing is happening. Your > code is not doing anything. If you follow the above then it will do > something for you i promise. > > >> >3. I would actually like to convert entities for example such as : >> > >> > >> >first name, last name, age, address, ... >> >Davide; Palmisano; 30; .. > > > > Piece of cake > >> > >> > >> >How am I going to introduce schema.org vocabulary >> >into conversion configuration? What are the relevant APIs? >> > > You don;t need to. We've already implemented this for you. > > >> > >> > >> >Is it the URI I put inside the extractionContext? (or this URI is for >> >introducing the >> >schema.org - so context comes from there ) >> > > No this is your target URI from which you wish to build a triples > manifestation. You do not need to care about the individual nature of the > vocabularies you wish to recognize within source data. Any23 will do this > for you. > > >> >Thank you for your time and your valuable help. >> >Once the issue is going to be resolved, I also hope to post it in the >> >internet so that more people can get help concerning this. >> > > > > Well it is on the internet now. I hope that you are able to use Any23 for > your task. > Please post to this list if you have further difficulties and we can help > you. > Lewis > > --001a113464202dae8c050e051d89--