Coder Social home page Coder Social logo

leonieweissweiler / cistem Goto Github PK

View Code? Open in Web Editor NEW
42.0 4.0 11.0 1.75 MB

Stemmer for German

Home Page: http://www.cis.lmu.de/~weissweiler/

License: MIT License

Perl 8.85% C 19.06% Python 10.21% Java 8.49% Swift 9.71% C++ 13.80% Haskell 8.37% JavaScript 12.38% C# 9.12%
stemming stemmer stemmers stemming-algorithm segmentation nlp computational-linguistics perl german german-language

cistem's People

Contributors

fkoehne avatar fohlen avatar jannikbecker avatar leonieweissweiler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cistem's Issues

Web Assembly?

Looking for complete stemmer implementations for german I stumbled upon this. Why not add a web assembly export? I know its very experimental, but it would open up a lot of platforms already. ;) (pretty please)

Potential UNICODE normalisation problem

If the word as input is not normalised to NFC, the following parts will not work:

  • transformation of äöü to aou
  • length() calculation
  • substr($original, - $rest_length)

Working on "whatever" normalised would be complicated.

Typo in "cistem.cpp"

Hi!

I recognized, the first line of "cistem.cpp" says

#include "Cistem.hpp"

I assume it should be

#include "cistem.hpp"

Best,
Florian

Rust translation

I made a Rust translation of CISTEM for a project of mine: cistemrs. Probably you don't want to merge it into the repo, but maybe it's useful for other people using the language.

This issue is more of a comment and can be closed immediately. Thanks for the stemmer! It works very well for information retrieval. :)

Removing of prefix "ge" is too aggressive

Thank you for the useful stemmer. I have stumbled upon an issue:
There should be some exceptions for removing the prefix "ge".
E.g.
"Geschlecht" is stemmed to "schlecht"
"Gesellschaft" is stemmed to "sellschaft"
"gesamt" is stemmed to "samt"
"genau" is stemmed to "nau"
etc.

Methods stem and segments should return the same stem

The difference of transformation between stem() and segments() is:

  • removement of prefix ge-
  • transformation of äöü to aou
  • transformation of ß to ss

Example:

#!perl
use strict;
use warnings;
use utf8;

binmode(STDOUT,":encoding(UTF-8)");
binmode(STDERR,":encoding(UTF-8)");

use lib qw(../CISTEM);

use Cistem;

my @words = qw/geheilwässert/;

for my $word (@words) {
  for my $case_sensitive (0..1) {
    print 'Cistem::stem(',$word,',',$case_sensitive,'): ',
    Cistem::stem($word,$case_sensitive),"\n";
  }

  for my $case_sensitive (0..1) {
    print 'Cistem::segment(',$word,',',$case_sensitive,'): ',
    join('-',Cistem::segment($word,$case_sensitive)),"\n";
  }
}

Which results in:

~/github/perl/CISTEM-test$ perl cistem.t
Cistem::stem(geheilwässert,0): heilwass
Cistem::stem(geheilwässert,1): heilwass
Cistem::segment(geheilwässert,0): geheilwäss-ert
Cistem::segment(geheilwässert,1): geheilwäss-ert

I would expect the same segmentation:

ge-heilwass-ert

This would also allow sharing most of the code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.