Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wildly differing results compared to crfsuite-rs #16

Open
decahedron1 opened this issue Dec 22, 2022 · 0 comments
Open

Wildly differing results compared to crfsuite-rs #16

decahedron1 opened this issue Dec 22, 2022 · 0 comments

Comments

@decahedron1
Copy link

I'm using crfs for part-of-speech tagging and I noticed the output is very different compared to crfsuite-rs.

With the input The quick brown fox jumped over the lazy dog:

crfsuite-rs: DT JJ NN RB VBN IN DT JJ NN
crfs: DT JJ NN JJ NN IN DT JJ NN

Tagging code using crfs
Model: pos.crf
Test script:

use std::fs;

use crfs::Model;
use pos_test::PartOfSpeechTagger;

fn main() {
	let model = fs::read("./pos.crf").unwrap();
	let model = Model::new(&model).unwrap();
	let mut tagger = PartOfSpeechTagger::new(&model, Default::default()).unwrap();
	let sentence = "The quick brown fox jumped over the lazy dog.";
	let results = tagger.tag(&sentence.split_ascii_whitespace().collect::<Vec<_>>()).unwrap();
	for part in results {
		print!("{part} ");
	}
	println!();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant