Citar: avoid tagging an empty string

It seem like current verion of citar (a part-of-speech tagger) tags even empty strings. Empty strings must not be tagged and must not be in token list. So I patch it as follow:

diff -Nur citar.orig/tag/tag.cpp citar/tag/tag.cpp
--- citar.orig/tag/tag.cpp	2010-03-08 08:55:32.000000000 +0000
+++ citar/tag/tag.cpp	2010-03-08 08:56:12.000000000 +0000
@@ -90,7 +90,7 @@
 		if (line.isNull())
 			break;
 
-		QStringList splittedLine = line.split(" ");
+		QStringList splittedLine = line.split(" ",  QString::SkipEmptyParts);
 
 		// Get the sequence of words, adding start/end markers.
 		QVector sentence(2, "");

ใส่ความเห็น

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / เปลี่ยนแปลง )

Twitter picture

You are commenting using your Twitter account. Log Out / เปลี่ยนแปลง )

Facebook photo

You are commenting using your Facebook account. Log Out / เปลี่ยนแปลง )

Google+ photo

You are commenting using your Google+ account. Log Out / เปลี่ยนแปลง )

Connecting to %s