Show / Hide Table of Contents

    Class BinaryDictionaryWriter

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

    Constructors

    | Improve this Doc View Source

    BinaryDictionaryWriter(Type, Int32)

    Declaration
    public BinaryDictionaryWriter(Type implClazz, int size)
    Parameters
    Type Name Description
    System.Type implClazz
    System.Int32 size

    Fields

    | Improve this Doc View Source

    m_buffer

    Declaration
    protected ByteBuffer m_buffer
    Field Value
    Type Description
    J2N.IO.ByteBuffer
    | Improve this Doc View Source

    m_implClazz

    Declaration
    protected readonly Type m_implClazz
    Field Value
    Type Description
    System.Type

    Methods

    | Improve this Doc View Source

    AddMapping(Int32, Int32)

    Declaration
    public virtual void AddMapping(int sourceId, int wordId)
    Parameters
    Type Name Description
    System.Int32 sourceId
    System.Int32 wordId
    | Improve this Doc View Source

    GetBaseFileName(String)

    Declaration
    protected string GetBaseFileName(string baseDir)
    Parameters
    Type Name Description
    System.String baseDir
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    Put(String[])

    Put the entry in map.

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

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

    | Improve this Doc View Source

    SharedPrefix(String, String)

    Declaration
    public static int SharedPrefix(string left, string right)
    Parameters
    Type Name Description
    System.String left
    System.String right
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    Write(String)

    Write dictionary in file

    Declaration
    public virtual void Write(string baseDir)
    Parameters
    Type Name Description
    System.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
    System.IO.IOException

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

    | Improve this Doc View Source

    WriteDictionary(String)

    Declaration
    protected virtual void WriteDictionary(string filename)
    Parameters
    Type Name Description
    System.String filename
    | Improve this Doc View Source

    WritePosDict(String)

    Declaration
    protected virtual void WritePosDict(string filename)
    Parameters
    Type Name Description
    System.String filename
    | Improve this Doc View Source

    WriteTargetMap(String)

    Declaration
    protected virtual void WriteTargetMap(string filename)
    Parameters
    Type Name Description
    System.String filename
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)