Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2004-09

Porter stemming routine for FPC

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alan Mead

Porter stemming is an approximate method for removing English-language endings from words ... for example, to match 'happy' and 'happiness'.

I found a website on tartarus.org that purports to be Porter's website and has a Delphi 5 implementation of his word stemming algorithm. But I cannot get it to compile because of errors in inline asm code (about which, I know nothing). So, I thought before I rip that out and re-implement.. *if* I'm even capable... I would check if anyone has already done so or otherwise has an FPC-compatible Porter stemming routine that I could use.

Alternatively, I also have a Perl version which looks simple enough to port, it's a series of regex's. But when I run testreg1.pp compiled with 1.9.4 on Linux, it looks like regex support is broken: error near 1000 index:0 len:0 ...

Many thanks,

-Alan

Reply by email

Alan Mead
to Alan Mead

Ack! After posting this, I actually read the code and discovered that the author provided "pure pascal" alternative bits. The unit compiles without even a warning now. Sorry.

-Alan

--- Alan Mead wrote 19 lines
Porter stemming is an approximate method for removing English-language endings from words ... for example, to match 'happy' and 'happiness'. I found a website on tartarus.org that purports to be Porter's website and has a Delphi 5 implementation of his word stemming algorithm. But I cannot get it to compile because of errors in inline asm code (about which, I know nothing). So, I thought before I rip that out and re-implement.. *if* I'm even capable... I would check if anyone has already done so or otherwise has an FPC-compatible Porter stemming routine that I could use. Alternatively, I also have a Perl version which looks simple enough to port, it's a series of regex's. But when I run testreg1.pp compiled with 1.9.4 on Linux, it looks like regex support is broken: error near 1000 index:0 len:0 ...

Reply by email