Apertium

Function for calculating how many times different contexts appear

As part of inducing Constraint Grammar rules we need to know the n-gram probabilities of words and features.

Add to parser.py a function that calculates how many times a n-sized (n being natural number) context of words appears. The code does already calculation of 1-sized context, try to see if you can build up on that.

Task tags

  • python
  • cg

Students who completed this task

nuboro

Task type

  • code Code
close

2016