public class WNUtil
extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
delimiters
Word delimiters used by various routines.
|
| Constructor and Description |
|---|
WNUtil() |
| Modifier and Type | Method and Description |
|---|---|
private static Vector |
getDescriptorColumnLabels() |
static JTable |
getDescriptorTable(AbstractTypeDescriptor[] descriptors)
Builds a JTable showing a list of type descriptors.
|
private static Vector |
getDescriptorVector(int sequence,
AbstractTypeDescriptor d) |
static String[] |
guessWordsFromPhrase(String phrase)
Tries a few heuristics to break up a "word" into its parts.
|
static void |
queryForDictFolder(JFrame f)
Query the user for a new graphs folder.
|
static int |
wordCount(String s,
boolean smart)
Counts up the number of words in a term, where a word is considered any
sequence of characters that doesn't include the delimiter set from
WNUtil.delimiters.
|
public static String delimiters
public static String[] guessWordsFromPhrase(String phrase)
| Phrase | Result |
Physical_System | { "physical", "system" }
|
tempSensor | { "temp", "sensor" }
|
phrase - to be guessed from.delimiterspublic static int wordCount(String s,
boolean smart)
s - string where terms will be foundsmart - try to break up words by guessingguessWordsFromPhrase(java.lang.String),
delimiterspublic static JTable getDescriptorTable(AbstractTypeDescriptor[] descriptors)
descriptors - zero or more type descriptors.private static Vector getDescriptorColumnLabels()
private static Vector getDescriptorVector(int sequence,
AbstractTypeDescriptor d)
public static void queryForDictFolder(JFrame f)
f - parent frame for the dialog.