Class ConnectionCosts
- java.lang.Object
-
- org.apache.lucene.analysis.ja.dict.ConnectionCosts
-
public final class ConnectionCosts extends java.lang.Object
n-gram connection cost data
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ConnectionCosts.SingletonHolder
-
Field Summary
Fields Modifier and Type Field Description private short[][]
costs
static java.lang.String
FILENAME_SUFFIX
static java.lang.String
HEADER
static int
VERSION
-
Constructor Summary
Constructors Modifier Constructor Description private
ConnectionCosts()
ConnectionCosts(BinaryDictionary.ResourceScheme scheme, java.lang.String path)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
get(int forwardId, int backwardId)
static ConnectionCosts
getInstance()
-
-
-
Field Detail
-
FILENAME_SUFFIX
public static final java.lang.String FILENAME_SUFFIX
- See Also:
- Constant Field Values
-
HEADER
public static final java.lang.String HEADER
- See Also:
- Constant Field Values
-
VERSION
public static final int VERSION
- See Also:
- Constant Field Values
-
costs
private final short[][] costs
-
-
Constructor Detail
-
ConnectionCosts
public ConnectionCosts(BinaryDictionary.ResourceScheme scheme, java.lang.String path) throws java.io.IOException
- Parameters:
scheme
- - scheme for loading resources (FILE or CLASSPATH).path
- - where to load resources from, without the ".dat" suffix- Throws:
java.io.IOException
-
ConnectionCosts
private ConnectionCosts() throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
get
public int get(int forwardId, int backwardId)
-
getInstance
public static ConnectionCosts getInstance()
-
-