1 /* 2 * Copyright (C) 2008,2009 OMRON SOFTWARE Co., Ltd. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package jp.co.omronsoft.openwnn; 18 19 /** 20 * The container class of a clause. 21 * 22 * @author Copyright (C) 2009, OMRON SOFTWARE CO., LTD. All Rights Reserved. 23 */ 24 public class WnnClause extends WnnWord { 25 26 /** 27 * Constructor 28 * 29 * @param candidate The string of the clause 30 * @param stroke The reading of the clause 31 * @param posTag The part of speech of the clause 32 * @param frequency The frequency of the clause 33 */ 34 public WnnClause(String candidate, String stroke, WnnPOS posTag, int frequency) { 35 super(candidate, 36 stroke, 37 posTag, 38 frequency); 39 } 40 41 /** 42 * Constructor 43 * 44 * @param stroke The reading of the clause 45 * @param stem The independent word part of the clause 46 */ 47 public WnnClause (String stroke, WnnWord stem) { 48 super(stem.id, 49 stem.candidate, 50 stroke, 51 stem.partOfSpeech, 52 stem.frequency, 53 0); 54 } 55 56 /** 57 * Constructor 58 * 59 * @param stroke The reading of the clause 60 * @param stem The independent word part of the clause 61 * @param fzk The ancillary word part of the clause 62 */ 63 public WnnClause (String stroke, WnnWord stem, WnnWord fzk) { 64 super(stem.id, 65 stem.candidate + fzk.candidate, 66 stroke, 67 new WnnPOS(stem.partOfSpeech.left, fzk.partOfSpeech.right), 68 stem.frequency, 69 1); 70 } 71 } 72