Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class BinaryDictionaryWriter

    Inheritance
    object
    BinaryDictionaryWriter
    TokenInfoDictionaryWriter
    UnknownDictionaryWriter
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Analysis.Ja.Util
    Assembly: Lucene.Net.Analysis.Kuromoji.dll
    Syntax
    public abstract class BinaryDictionaryWriter

    Constructors

    BinaryDictionaryWriter(Type, int)

    Declaration
    protected BinaryDictionaryWriter(Type implClazz, int size)
    Parameters
    Type Name Description
    Type implClazz
    int size

    Fields

    m_buffer

    Declaration
    protected ByteBuffer m_buffer
    Field Value
    Type Description
    ByteBuffer

    m_implClazz

    Declaration
    protected readonly Type m_implClazz
    Field Value
    Type Description
    Type

    Methods

    AddMapping(int, int)

    Declaration
    public virtual void AddMapping(int sourceId, int wordId)
    Parameters
    Type Name Description
    int sourceId
    int wordId

    GetBaseFileName(string)

    Declaration
    protected string GetBaseFileName(string baseDir)
    Parameters
    Type Name Description
    string baseDir
    Returns
    Type Description
    string

    Put(string[])

    Put the entry in map.

    Declaration
    public virtual int Put(string[] entry)
    Parameters
    Type Name Description
    string[] entry
    Returns
    Type Description
    int

    Current position of buffer, which will be wordId of next entry.

    SharedPrefix(string, string)

    Declaration
    public static int SharedPrefix(string left, string right)
    Parameters
    Type Name Description
    string left
    string right
    Returns
    Type Description
    int

    Write(string)

    Write dictionary in file

    Declaration
    public virtual void Write(string baseDir)
    Parameters
    Type Name Description
    string baseDir
    Remarks

    Dictionary format is: [Size of dictionary(int)], [entry:{left id(short)}{right id(short)}{word cost(short)}{length of pos info(short)}{pos info(char)}], [entry...], [entry...].....

    Exceptions
    Type Condition
    IOException

    If an I/O error occurs writing the dictionary files.

    WriteDictionary(string)

    Declaration
    protected virtual void WriteDictionary(string filename)
    Parameters
    Type Name Description
    string filename

    WritePosDict(string)

    Declaration
    protected virtual void WritePosDict(string filename)
    Parameters
    Type Name Description
    string filename

    WriteTargetMap(string)

    Declaration
    protected virtual void WriteTargetMap(string filename)
    Parameters
    Type Name Description
    string filename
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.