|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSentenceUtil
The SentenceUtil class provide utility functions for the various Books. It is not designed to be used outside of the book package, so using it outside of these bounds is at your own risk.
Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors. |
gnu.gpl.Licence
Method Summary | |
static int |
firstLetter(java.lang.String word)
Where is the first letter in this word |
static java.lang.String[] |
getWords(java.lang.String sentence)
From a sentence get a list of words (in original order) without any punctuation, and all in lower case. |
static int |
lastLetter(java.lang.String word)
Where is the last letter in this word |
static java.lang.String[] |
stripPunctuation(java.lang.String[] words)
From a sentence get a list of words (in original order) without any punctuation, and all in lower case. |
static java.lang.String |
stripPunctuationWord(java.lang.String word)
Remove the punctuation from the ends of the word |
static java.lang.String[] |
stripWords(java.lang.String[] words)
From a sentence get a list of words (in original order) without any punctuation, and all in lower case. |
static java.lang.String |
stripWords(java.lang.String first,
java.lang.String last)
Remove the punctuation from the ends of the word. |
static java.lang.String[] |
tokenize(java.lang.String sentence)
Take a string and tokenize it using " " and "--" as delimiters into an Array of Strings. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.String[] tokenize(java.lang.String sentence)
sentence
- The string to parse.
public static java.lang.String[] stripPunctuation(java.lang.String[] words)
words
- Words with punctuation
public static java.lang.String[] stripWords(java.lang.String[] words)
words
- Words with punctuation
public static java.lang.String[] getWords(java.lang.String sentence)
sentence
- The string to parse.
public static java.lang.String stripPunctuationWord(java.lang.String word)
word
- Word with punctuation
public static java.lang.String stripWords(java.lang.String first, java.lang.String last)
first
- The word to grab the punctuation from the end oflast
- The word to grab the punctuation from the start of
public static int firstLetter(java.lang.String word)
word
- The word to search for letters
public static int lastLetter(java.lang.String word)
word
- The word to search for letters
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |