Martin Porter | 14 Mar 2003 15:43
Picon

Re: Need Help


Mohamed,

Hello.

I am not quite sure what you mean by a "suffix tree algorithm". Could you
explain further? 

I do not have anything other than sample words lists as meterial with which
to test out the algorithms, and I'm not sure where you could get word files
classified by part of speech, although no doubt such things exist. I am
sorry I cannot be of more help at the moment.

I'm posting your message and my reply on the snowball web site, where it may
get further responses that could be of use to you.

Martin

At 14:13 14/03/2003 +0200, Mohamed Saeed wrote:
>Hi my graduation project depending on making phrases of large text and i
use your stemming algorithm and i want if u have algorithm of suffix tree
algorithm or file of words which used in making dictionaries
(nouns,verbs,...etc) i'll thanx for u at all thank u very much. 
>Mohamed Saeed.
Oleg Bartunov | 14 Mar 2003 16:44
Picon

Re: Re: Need Help

It seems he needs http://sary.namazu.org.
I use sary to create suffix array on dictionary files and very fast
search.

	Oleg
On Fri, 14 Mar 2003, Martin Porter wrote:

>
> Mohamed,
>
> Hello.
>
> I am not quite sure what you mean by a "suffix tree algorithm". Could you
> explain further?
>
> I do not have anything other than sample words lists as meterial with which
> to test out the algorithms, and I'm not sure where you could get word files
> classified by part of speech, although no doubt such things exist. I am
> sorry I cannot be of more help at the moment.
>
> I'm posting your message and my reply on the snowball web site, where it may
> get further responses that could be of use to you.
>
> Martin
>
>
> At 14:13 14/03/2003 +0200, Mohamed Saeed wrote:
> >Hi my graduation project depending on making phrases of large text and i
> use your stemming algorithm and i want if u have algorithm of suffix tree
> algorithm or file of words which used in making dictionaries
(Continue reading)

Martin Porter | 17 Mar 2003 06:16
Picon

Re: Re: Need Help


Oleg, 
Thanks for that information. I have since read up suffix trees, and received
an acknowledgement from Mr Saeed thanking us for helping.

Martin
Jacob Hallenborg | 25 Mar 2003 17:16
Picon
Picon

call stemmer from C++

 Hi,

Does anyone know how to call the generated C stemmer from a C++ program. 
I've been trying to insert 'extern "C"' at various places in the 
driver-porter.c-example, but with no success.

Thanks in advance
/jacob
Olly Betts | 25 Mar 2003 17:41
Favicon
Gravatar

Re: call stemmer from C++

On Tue, Mar 25, 2003 at 05:16:40PM +0100, Jacob Hallenborg wrote:
> Does anyone know how to call the generated C stemmer from a C++ program. 
> I've been trying to insert 'extern "C"' at various places in the 
> driver-porter.c-example, but with no success.

We call them from the Xapian C++ library by adding 'extern "C"' wrappers
to the *header* files like so:

  #ifdef __cplusplus
  extern "C" {
  #endif

  /* This file was generated automatically by the Snowball to ANSI C
   * compiler */

  extern struct SN_env * snowball_english_create_env(void);
  extern void snowball_english_close_env(struct SN_env * z);

  extern int snowball_english_stem(struct SN_env * z);

  #ifdef __cplusplus
  }
  #endif

Then just include this from your C++ source and call the functions as
you would from C.  It would be good if the snowball compiler added this
wrapper.  Martin: the changes should be obvious, but let me know if you
want a patch.

Cheers,
(Continue reading)

Jacob Hallenborg | 25 Mar 2003 18:04
Picon
Picon

Re: call stemmer from C++

Thanks for your quick reply!

Unfortunately I'm not a so good at this. Should I put the extern stuff 
in api.h, header.h and stem.h? And should the braces include the whole 
file (all declarations) or just some part? I guess the 
include-statements in the C++ code doesn't need any extern stuff?
I'm using gcc 2.95.

Thanks,
/jacob

Olly Betts wrote:

>On Tue, Mar 25, 2003 at 05:16:40PM +0100, Jacob Hallenborg wrote:
>  
>
>>Does anyone know how to call the generated C stemmer from a C++ program. 
>>I've been trying to insert 'extern "C"' at various places in the 
>>driver-porter.c-example, but with no success.
>>    
>>
>
>We call them from the Xapian C++ library by adding 'extern "C"' wrappers
>to the *header* files like so:
>
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
>  
>  /* This file was generated automatically by the Snowball to ANSI C
(Continue reading)

Olly Betts | 25 Mar 2003 18:22
Favicon
Gravatar

Re: call stemmer from C++

On Tue, Mar 25, 2003 at 06:04:25PM +0100, Jacob Hallenborg wrote:
> Unfortunately I'm not a so good at this. Should I put the extern stuff 
> in api.h, header.h and stem.h?

The header file generated by the Snowball compiler which you include in
your own code - probably stem.h, but the "--output" option sets the name
so if you've generated it yourself it will be called whatever you asked
for!

Compare your stem.h to the file quoted below - it should match apart
from the "snowball_english_" prefixes and the "#ifdef __cplusplus" bits.

> And should the braces include the whole file (all declarations) or
> just some part?

Wrap the whole header, exactly as I show:

> > #ifdef __cplusplus
> > extern "C" {
> > #endif
> > 
> > /* This file was generated automatically by the Snowball to ANSI C
> >  * compiler */
> > 
> > extern struct SN_env * snowball_english_create_env(void);
> > extern void snowball_english_close_env(struct SN_env * z);
> > 
> > extern int snowball_english_stem(struct SN_env * z);
> > 
> > #ifdef __cplusplus
(Continue reading)


Gmane