• API

    Show / Hide Table of Contents

    Class FileDictionary

    Dictionary represented by a text file.

    Format allowed: 1 entry per line:

    An entry can be:

    1. suggestion
    2. suggestion Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter weight
    3. suggestion Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter weight Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter payload
    where the default Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter is DEFAULT_FIELD_DELIMITER (a tab)

    NOTE:

    1. In order to have payload enabled, the first entry has to have a payload
    2. If the weight for an entry is not specified then a value of 1 is used
    3. A payload cannot be specified without having the weight specified for an entry
    4. If the payload for an entry is not specified (assuming payload is enabled) then an empty payload is returned
    5. An entry cannot have more than two Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiters

    Example:

    word1 word2 TAB 100 TAB payload1

    word3 TAB 101

    word4 word3 TAB 102

    Inheritance
    System.Object
    FileDictionary
    Implements
    IDictionary
    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.Search.Suggest
    Assembly: Lucene.Net.Suggest.dll
    Syntax
    public class FileDictionary : IDictionary

    Constructors

    | Improve this Doc View Source

    FileDictionary(Stream)

    Creates a dictionary based on an inputstream. Using DEFAULT_FIELD_DELIMITER as the field seperator in a line.

    NOTE: content is treated as UTF-8

    Declaration
    public FileDictionary(Stream dictFile)
    Parameters
    Type Name Description
    System.IO.Stream dictFile
    | Improve this Doc View Source

    FileDictionary(Stream, String)

    Creates a dictionary based on an inputstream. Using fieldDelimiter to seperate out the fields in a line.

    NOTE: content is treated as UTF-8

    Declaration
    public FileDictionary(Stream dictFile, string fieldDelimiter)
    Parameters
    Type Name Description
    System.IO.Stream dictFile
    System.String fieldDelimiter
    | Improve this Doc View Source

    FileDictionary(TextReader)

    Creates a dictionary based on a reader. Using DEFAULT_FIELD_DELIMITER as the field seperator in a line.

    Declaration
    public FileDictionary(TextReader reader)
    Parameters
    Type Name Description
    System.IO.TextReader reader
    | Improve this Doc View Source

    FileDictionary(TextReader, String)

    Creates a dictionary based on a reader. Using fieldDelimiter to seperate out the fields in a line.

    Declaration
    public FileDictionary(TextReader reader, string fieldDelimiter)
    Parameters
    Type Name Description
    System.IO.TextReader reader
    System.String fieldDelimiter

    Fields

    | Improve this Doc View Source

    DEFAULT_FIELD_DELIMITER

    Tab-delimited fields are most common thus the default, but one can override this via the constructor

    Declaration
    public const string DEFAULT_FIELD_DELIMITER = "\t"
    Field Value
    Type Description
    System.String

    Methods

    | Improve this Doc View Source

    GetEntryIterator()

    Declaration
    public virtual IInputIterator GetEntryIterator()
    Returns
    Type Description
    IInputIterator

    Implements

    IDictionary
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)