Class ConnectionCosts
java.lang.Object
org.apache.lucene.analysis.ko.dict.ConnectionCosts
n-gram connection cost data
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteBufferstatic final Stringprivate final intstatic final Stringstatic final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConnectionCosts(URL connectionCostsUrl) Create aConnectionCostsfrom an external resource URL (e.g.ConnectionCosts(Path connectionCostsFile) Create aConnectionCostsfrom an external resource path.ConnectionCosts(BinaryDictionary.ResourceScheme scheme, String path) Deprecated, for removal: This API element is subject to removal in a future version.privateConnectionCosts(IOSupplier<InputStream> connectionCostResource) -
Method Summary
Modifier and TypeMethodDescriptionintget(int forwardId, int backwardId) private static InputStreamstatic ConnectionCosts
-
Field Details
-
FILENAME_SUFFIX
- See Also:
-
HEADER
- See Also:
-
VERSION
public static final int VERSION- See Also:
-
buffer
-
forwardSize
private final int forwardSize
-
-
Constructor Details
-
ConnectionCosts
@Deprecated(forRemoval=true, since="9.1") public ConnectionCosts(BinaryDictionary.ResourceScheme scheme, String path) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.replaced byConnectionCosts(Path)for files andConnectionCosts(URL)for classpath/module resources.- Parameters:
scheme- - scheme for loading resources (FILE or CLASSPATH).path- - where to load resources from, without the ".dat" suffix- Throws:
IOException
-
ConnectionCosts
Create aConnectionCostsfrom an external resource path.- Parameters:
connectionCostsFile- where to load connection costs resource- Throws:
IOException- if resource was not found or broken
-
ConnectionCosts
Create aConnectionCostsfrom an external resource URL (e.g. from Classpath withClassLoader.getResource(String)).- Parameters:
connectionCostsUrl- where to load connection costs resource- Throws:
IOException- if resource was not found or broken
-
ConnectionCosts
- Throws:
IOException
-
ConnectionCosts
- Throws:
IOException
-
-
Method Details
-
getClassResource
- Throws:
IOException
-
get
public int get(int forwardId, int backwardId) -
getInstance
-
ConnectionCosts(Path)for files andConnectionCosts(URL)for classpath/module resources.