Search code examples
stemmingsnowball

Can i do this code python with snowball?


The word length is 5. I want to delete the letter in position 0 and the letter in position 3

with python seems like this :

word = word[1:3] + word[4] #this is with python

The question is, How i can do it with snowball ?


Solution

  • Maybe the solution seems like this:

    do(
        [substring] among (
                $p1 ($word_len == 5 delete)
          )
          markto $p2
          [substring] among (
    
                'cha' (atmark==$p2 delete)
          )
      )