?? dictionary.java
字號(hào):
/**
* Copyright 2007 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.paoding.analysis.dictionary;
/**
* Dictionary是一個(gè)只讀字典,用于查找是否包含某個(gè)詞語,以及相關(guān)信息。
* <p>
*
* @author Zhiliang Wang [qieqie.wang@gmail.com]
*
* @see BinaryDictionary
* @see HashBinaryDictionary
*
* @since 1.0
*
*/
public interface Dictionary {
/**
* 返回字典中詞語數(shù)>=0
*
* @return
*/
public int size();
/**
* 返回給定位置的詞語
*
* @param index
* 0,1,2,...,size-1
* @return
*/
public Word get(int index);
/**
* 搜索詞典是否收集input[offset]到input[offset+count-1]之間字符串(包含邊界)的詞。<br>
* 搜索結(jié)果以非空Hit對(duì)象給出。
* <p>
* @param input 要搜索的字符串是其中連續(xù)的一部分
* @param offset 要搜索的字符串開始位置相對(duì)input的偏移
* @param count 要搜索的字符串字符個(gè)數(shù)
* @return 返回的Hit對(duì)象非空,程序通過hit對(duì)象提供的方法判斷搜索結(jié)果
*
* @see Hit
*/
public Hit search(CharSequence input, int offset, int count);
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -