A Method in the API that Cleans Text

1 message Options
Embed this post
Permalink
Nick Khamis

A Method in the API that Cleans Text

Reply Threaded More More options
Print post
Permalink
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.

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03