|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmrc.LexicalDatabase
jmrc.MRCDatabase
public class MRCDatabase
Implementation of the MRC Psycholinguistic database, based on a LinkedHashMap.
Field Summary | |
---|---|
static Field |
FIELD_AOA
Age of acquisition |
static Field |
FIELD_BROWN_FREQ
Brown frequency |
static Field |
FIELD_CONC
Concreteness |
static Field |
FIELD_FAM
Familiarity |
static Field |
FIELD_IMAG
Imagability |
static Field |
FIELD_K_F_FREQ
K F frequency |
static Field |
FIELD_K_F_NCATS
K F number of categories |
static Field |
FIELD_K_F_NSAMP
K F number of samples |
static Field |
FIELD_MEANC
Meaningfulness (Colorado norms) |
static Field |
FIELD_MEANP
Meaningfulness (Paivo norms) |
static Field |
FIELD_NLET
Number of letters |
static Field |
FIELD_NPHON
Number of phonemes |
static Field |
FIELD_NSYL
Number of syllables |
static Field |
FIELD_T_L_FREQ
T L frequency |
Constructor Summary | |
---|---|
MRCDatabase(java.io.File dbFile)
Loads MRC Database with default number of entries. |
|
MRCDatabase(java.io.File dbFile,
int size)
Loads the MRC database into memory. |
Method Summary | |
---|---|
java.util.List<Field> |
getFields()
Returns all the fields of the MRC database. |
int |
getValue(java.lang.String word,
MRCPoS pos,
Field field)
Returns an integer feature value from the database. |
int |
getValue(java.lang.String word,
java.lang.String pos,
Field field)
Returns an integer feature value from the database. |
Methods inherited from class jmrc.LexicalDatabase |
---|
addEntriesFrom, containsEntry, containsField, containsField, getLexiconComparator, getMap, getValue, getValue, getValue, getValue, getWords, getWords, putValue |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Field FIELD_NLET
public static final Field FIELD_NPHON
public static final Field FIELD_NSYL
public static final Field FIELD_K_F_FREQ
public static final Field FIELD_K_F_NCATS
public static final Field FIELD_K_F_NSAMP
public static final Field FIELD_T_L_FREQ
public static final Field FIELD_BROWN_FREQ
public static final Field FIELD_FAM
public static final Field FIELD_CONC
public static final Field FIELD_IMAG
public static final Field FIELD_MEANC
public static final Field FIELD_MEANP
public static final Field FIELD_AOA
Constructor Detail |
---|
public MRCDatabase(java.io.File dbFile) throws java.io.IOException
dbFile
- file mrc2.dct
from the MRC Psycholinguistic Database directory.
java.io.IOException
public MRCDatabase(java.io.File dbFile, int size) throws java.io.IOException
dbFile
- file mrc2.dct
from the MRC Psycholinguistic Database directory.size
- number of entries in the file.
java.io.IOException
Method Detail |
---|
public int getValue(java.lang.String word, MRCPoS pos, Field field) throws QueryException
word
- Lemma of the word to look for.pos
- Part-of-Speech of the word.field
- Field of the database providing the value.
QueryException
- if the word/PoS/Field isn't found,
or if the value is undefined (e.g. 0 value for some fields).public int getValue(java.lang.String word, java.lang.String pos, Field field) throws QueryException
word
- Lemma of the word to look for.pos
- String representation of the Part-of-Speech of the word.field
- Field of the database providing the value.
QueryException
- if the word/PoS/Field isn't found,
or if the value is undefined (e.g. 0 value for some fields).public java.util.List<Field> getFields()
getFields
in class LexicalDatabase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |