You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by cephtahrioh <ra...@gmail.com> on 2014/03/09 16:09:05 UTC
Get outlink URL's text context
Hi Guys. Anyone knows an efficient way to extract the text context that wraps
an outlink URL. For example, given this sample text containing an outlink:
Nutch can run on a single machine, but gains a lot of its strength from
running in a Hadoop cluster. You can download Nutch here
<https://nutch.apache.org/downloads.html)> For more information about
Apache Nutch, please see the Nutch wiki.
In this example, I would like to get the sentence containing the link, and a
sentence before and after that sentence. Any way to do this efficiently? Any
methods I can invoke to get something like the position of the link within a
fetched content? Or even a part of the nutch code I can modify to do this?
Thanks!
--
View this message in context: http://lucene.472066.n3.nabble.com/Get-outlink-URL-s-text-context-tp4122389.html
Sent from the Nutch - Dev mailing list archive at Nabble.com.
Re: Get outlink URL's text context
Posted by Mateusz Zakarczemny <ma...@up2data.pl>.
Try to write custom parser plugin. You could base on
org.apache.nutch.parse.html.HtmlParser
or org.apache.nutch.parse.tika.TikaParser
2014-03-09 16:09 GMT+01:00 cephtahrioh <ra...@gmail.com>:
> Hi Guys. Anyone knows an efficient way to extract the text context that
> wraps an outlink URL. For example, given this sample text containing an
> outlink:
>
> Nutch can run on a single machine, but gains a lot of its strength from
> running in a Hadoop cluster. You can download Nutch here<https://nutch.apache.org/downloads.html)>For more information about Apache Nutch, please see the Nutch wiki.
>
> In this example, I would like to get the sentence containing the link, and
> a sentence before and after that sentence. Any way to do this efficiently?
> Any methods I can invoke to get something like the position of the link
> within a fetched content? Or even a part of the nutch code I can modify to
> do this? Thanks!
> ------------------------------
> View this message in context: Get outlink URL's text context<http://lucene.472066.n3.nabble.com/Get-outlink-URL-s-text-context-tp4122389.html>
> Sent from the Nutch - Dev mailing list archive<http://lucene.472066.n3.nabble.com/Nutch-Dev-f619766.html>at Nabble.com.
>