Search Mailing List Archives
[protege-discussion] A Method That Cleans Text
Nick Khamis
symack at gmail.com
Thu Jul 2 05:31:12 PDT 2009
Hello Everyone,
Is there a method in the Protegex OWL-API that cleans the text normalizing
it to a format that will play nice when creating individuals or concepts
etc... avoiding rudimentary methods that look something like something like
this:
protected static String ConvertAsciiToText(String pValue)
{
if (pValue != null)
{
pValue = pValue.replace("@", "-");
pValue = pValue.replace("!", " ");
pValue = pValue.replace("$", "-");
pValue = pValue.replace("%", " Percent ");
pValue = pValue.replace("(","-");
pValue = pValue.replace(")","-");
pValue = pValue.replace("*", "-");
pValue = pValue.replace("<","-");
pValue = pValue.replace(">", "-");
pValue = pValue.replace("@", "-at-");
pValue = pValue.replace("^", "_");
pValue = pValue.replace("`", " ");
Thanks in Advanced,
Ninus.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20090702/2d691426/attachment.html>
More information about the protege-discussion
mailing list