[sword-svn] r86 - trunk/flashtools

scribe at www.crosswire.org scribe at www.crosswire.org
Tue May 22 13:16:04 MST 2007


Author: scribe
Date: 2007-05-22 13:16:04 -0700 (Tue, 22 May 2007)
New Revision: 86

Modified:
   trunk/flashtools/flash.cpp
Log:
Added stripping of punctuation


Modified: trunk/flashtools/flash.cpp
===================================================================
--- trunk/flashtools/flash.cpp	2007-05-22 18:24:38 UTC (rev 85)
+++ trunk/flashtools/flash.cpp	2007-05-22 20:16:04 UTC (rev 86)
@@ -104,6 +104,8 @@
 			SWBuf strong = word->second["Lemma"];
 			SWBuf text = word->second["Text"];
 			text.trim();
+			// trim punctuation from end
+			while (text.size() && (strchr(".;,?-!\"()[]{}':/\t\r\n ", text[text.size()-1]))) text.setSize(text.size()-1);
 			if (!text.size()) text = "[Untranslated]";
 			strong << 1;
 			wordList[atoi(strong.c_str())].freq++;




More information about the sword-cvs mailing list