You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Eran Zinman <zz...@gmail.com> on 2009/11/02 09:43:09 UTC
including code between plugins
Hi,
I've written my own plugin that's doing some custom parsing.
I've needed language parsing in that plugin and the language-identifier
plugin is wokring great for my needs.
However, I can't use the language identifier plugin as it is, since I want
to parse only a small portion of the webpage.
I've used the language identifier functions and it worked great in eclipse,
but when I try to compile my plugin I'm unable to compile it since it
depends on the language-identifier source code.
My question is - how can I include the language identifier code in my plugin
code without actually using the language-identifier plugin?
Thank you for your help!
Thanks,
Eran
Re: including code between plugins
Posted by Eran Zinman <zz...@gmail.com>.
Hi Andrzej,
thank you so much! that worked like a charm!
I've spent so much time trying to figure this out and you helped me solve it
in 5 min!
Thanks!
Eran
On Mon, Nov 2, 2009 at 11:13 AM, Andrzej Bialecki <ab...@getopt.org> wrote:
> Eran Zinman wrote:
>
>> Hi,
>>
>> I've written my own plugin that's doing some custom parsing.
>>
>> I've needed language parsing in that plugin and the language-identifier
>> plugin is wokring great for my needs.
>>
>> However, I can't use the language identifier plugin as it is, since I want
>> to parse only a small portion of the webpage.
>>
>> I've used the language identifier functions and it worked great in
>> eclipse,
>> but when I try to compile my plugin I'm unable to compile it since it
>> depends on the language-identifier source code.
>>
>> My question is - how can I include the language identifier code in my
>> plugin
>> code without actually using the language-identifier plugin?
>>
>
> You need to add the language-identifier plugin to the <requires> section in
> your plugin.xml, like this:
>
> <requires>
> <import plugin="nutch-extensionpoints"/>
> <import plugin="language-identifier"/>
> </requires>
>
>
> --
> Best regards,
> Andrzej Bialecki <><
> ___. ___ ___ ___ _ _ __________________________________
> [__ || __|__/|__||\/| Information Retrieval, Semantic Web
> ___|||__|| \| || | Embedded Unix, System Integration
> http://www.sigram.com Contact: info at sigram dot com
>
>
Re: including code between plugins
Posted by Andrzej Bialecki <ab...@getopt.org>.
Eran Zinman wrote:
> Hi,
>
> I've written my own plugin that's doing some custom parsing.
>
> I've needed language parsing in that plugin and the language-identifier
> plugin is wokring great for my needs.
>
> However, I can't use the language identifier plugin as it is, since I want
> to parse only a small portion of the webpage.
>
> I've used the language identifier functions and it worked great in eclipse,
> but when I try to compile my plugin I'm unable to compile it since it
> depends on the language-identifier source code.
>
> My question is - how can I include the language identifier code in my plugin
> code without actually using the language-identifier plugin?
You need to add the language-identifier plugin to the <requires> section
in your plugin.xml, like this:
<requires>
<import plugin="nutch-extensionpoints"/>
<import plugin="language-identifier"/>
</requires>
--
Best regards,
Andrzej Bialecki <><
___. ___ ___ ___ _ _ __________________________________
[__ || __|__/|__||\/| Information Retrieval, Semantic Web
___|||__|| \| || | Embedded Unix, System Integration
http://www.sigram.com Contact: info at sigram dot com