CRFSuite vs CRF++ Parameters & Results

888 views Asked by At

How do I mimic the results of a basic CRF++ model in CRFSuite?

I have been using CRF++ for some time and the results have been very promising, however I have recently switched to CRFSuite with Python implementation to get the model into production. That said, I have been unable to replicate to results I've obtained with CRF++ in CRFSuite using simple parameters.

The model I have created is as simple as possible with only one feature (current word):

**CRF++ Model:**
#Unigrams
U00:%x[0,0]
#Bigrams
#B

**CRFSuite Model**
def word2features(sent, i):
    word = sent[i][0]
    features = [
        'word=' + word,
    ]
    return features

The CRFSuite model is based off of this example - https://github.com/scrapinghub/python-crfsuite/blob/master/examples/CoNLL%202002.ipynb

I am using the default parameters for CRF++, but even modifying the parameters for CRFSuite to match those has been unable to get the same results.

The parameters I am using for CRFSuite are (from the manual):

algorithm = lbfgs
c1 = 0
c2 = 1

Which is supposedly the same as the default parameters in CRF++ (I'd post the manual but dont have enough rep - searched for CRF++ documentation).

Am I missing something? Thanks!

0

There are 0 answers