making some clear up

git-svn-id: https://russianmorphology.googlecode.com/svn/trunk@63 d817d54c-26ab-11de-abc9-2f7d1455ff7a
This commit is contained in:
alexander.a.kuznetsov
2009-10-17 17:25:13 +00:00
parent 8c833132a8
commit c858d2560a
7 changed files with 1 additions and 32696 deletions
-121
View File
@@ -1,121 +0,0 @@
// טלוםא
במ C לנ,טל,וה,טל
בן C לנ,טל,וה,נה
בנ C לנ,טל,וה,הע
בס C לנ,טל,וה,גם
בע C לנ,טל,וה,עג
בף C לנ,טל,וה,ןנ
ב C לנ,טל,וה,חג,נאחד
בפ C לנ,טל,לם,טל
בץ C לנ,טל,לם,נה
בצ C לנ,טל,לם,הע
בק C לנ,טל,לם,גם
בר C לנ,טל,לם,עג
בש C לנ,טל,לם,ןנ
ב I לנ,טל,0
ג E לנ-זנ,טל,0
ג E לנ-זנ,טל,וה,טל
ג E לנ-זנ,טל,וה,נה
ג E לנ-זנ,טל,וה,הע
ג E לנ-זנ,טל,וה,גם
ג E לנ-זנ,טל,וה,עג
ג E לנ-זנ,טל,וה,ןנ
ג E לנ-זנ,טל,וה,חג,נאחד
ג E לנ-זנ,טל,לם,טל
ג E לנ-זנ,טל,לם,נה
ג E לנ-זנ,טל,לם,הע
ג E לנ-זנ,טל,לם,גם
ג E לנ-זנ,טל,לם,עג
ג E לנ-זנ,טל,לם,ןנ
המ I זנ,טל,וה,טל
הן I זנ,טל,וה,נה
הנ I זנ,טל,וה,הע
הס I זנ,טל,וה,גם
הע I זנ,טל,וה,עג
הף I זנ,טל,וה,ןנ
ה I זנ,טל,וה,חג,נאחד
הפ I זנ,טל,לם,טל
הץ I זנ,טל,לם,נה
הצ I זנ,טל,לם,הע
הק I זנ,טל,לם,גם
הר I זנ,טל,לם,עג
הש I זנ,טל,לם,ןנ
ה I זנ,טל,0
// לףזסךטו מעקוסעגא
א Q לנ,מעק,וה,טל,
ב Q לנ,מעק,וה,נה,
ג Q לנ,מעק,וה,הע,
ד Q לנ,מעק,וה,גם,
ה Q לנ,מעק,וה,עג,
ו Q לנ,מעק,וה,ןנ,
ם Q לנ,מעק,לם,טל,
מ Q לנ,מעק,לם,נה,
ן Q לנ,מעק,לם,הע,
נ Q לנ,מעק,לם,גם,
ס Q לנ,מעק,לם,עג,
ע Q לנ,מעק,לם,ןנ,
// זוםסךטו מעקוסעגא
ז Q זנ,מעק,וה,טל,
ח Q זנ,מעק,וה,נה,
ט Q זנ,מעק,וה,הע,
ך Q זנ,מעק,וה,גם,
כ Q זנ,מעק,וה,עג,
ל Q זנ,מעק,וה,ןנ,
ף Q זנ,מעק,לם,טל,
פ Q זנ,מעק,לם,נה,
ץ Q זנ,מעק,לם,הע,
צ Q זנ,מעק,לם,גם,
ק Q זנ,מעק,לם,עג,
ר Q זנ,מעק,לם,ןנ,
// לףזסךטו מעקוסעגא
א Q לנ,מעק,וה,טל,
ב Q לנ,מעק,וה,נה,
ג Q לנ,מעק,וה,הע,
ד Q לנ,מעק,וה,גם,
ה Q לנ,מעק,וה,עג,
ו Q לנ,מעק,וה,ןנ,
ם Q לנ,מעק,לם,טל,
מ Q לנ,מעק,לם,נה,
ן Q לנ,מעק,לם,הע,
נ Q לנ,מעק,לם,גם,
ס Q לנ,מעק,לם,עג,
ע Q לנ,מעק,לם,ןנ,
// זוםסךטו מעקוסעגא
ז Q זנ,מעק,וה,טל,
ח Q זנ,מעק,וה,נה,
ט Q זנ,מעק,וה,הע,
ך Q זנ,מעק,וה,גם,
כ Q זנ,מעק,וה,עג,
ל Q זנ,מעק,וה,ןנ,
ף Q זנ,מעק,לם,טל,
פ Q זנ,מעק,לם,נה,
ץ Q זנ,מעק,לם,הע,
צ Q זנ,מעק,לם,גם,
ק Q זנ,מעק,לם,עג,
ר Q זנ,מעק,לם,ןנ,
// לףזסךטו מעקוסעגא (נאחד.)
א Q לנ,מעק,נאחד,וה,טל,
ב Q לנ,מעק,נאחד,וה,נה,
ג Q לנ,מעק,נאחד,וה,הע,
ד Q לנ,מעק,נאחד,וה,גם,
ה Q לנ,מעק,נאחד,וה,עג,
ו Q לנ,מעק,נאחד,וה,ןנ,
ם Q לנ,מעק,נאחד,לם,טל,
מ Q לנ,מעק,נאחד,לם,נה,
ן Q לנ,מעק,נאחד,לם,הע,
נ Q לנ,מעק,נאחד,לם,גם,
ס Q לנ,מעק,נאחד,לם,עג,
ע Q לנ,מעק,נאחד,לם,ןנ,
// זוםסךטו מעקוסעגא (נאחד.)
ז Q זנ,מעק,נאחד,וה,טל,
ח Q זנ,מעק,נאחד,וה,נה,
ט Q זנ,מעק,נאחד,וה,הע,
ך Q זנ,מעק,נאחד,וה,גם,
כ Q זנ,מעק,נאחד,וה,עג,
ל Q זנ,מעק,נאחד,וה,ןנ,
ף Q זנ,מעק,נאחד,לם,טל,
פ Q זנ,מעק,נאחד,לם,נה,
ץ Q זנ,מעק,נאחד,לם,הע,
צ Q זנ,מעק,נאחד,לם,גם,
ק Q זנ,מעק,נאחד,לם,עג,
ר Q זנ,מעק,נאחד,לם,ןנ,
-32459
View File
File diff suppressed because it is too large Load Diff
@@ -1,56 +0,0 @@
/**
* Copyright 2009 Alexander Kuznetsov
*
* 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 org.apache.lucene.morphology.dictionary;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
public class FrequentyReader {
private String fileName;
private String fileEncoding = "windows-1251";
public FrequentyReader(String fileName) {
this.fileName = fileName;
}
public FrequentyReader(String fileName, String fileEncoding) {
this.fileName = fileName;
this.fileEncoding = fileEncoding;
}
public Map<String, Double> read() throws IOException {
Map<String, Double> result = new HashMap<String, Double>();
BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(
new FileInputStream(fileName), fileEncoding));
String s = bufferedReader.readLine();
while (s != null) {
String[] strings = s.split(" ");
Double value = Double.valueOf(strings[1]);
result.put(strings[2], value);
s = bufferedReader.readLine();
}
return result;
}
}
@@ -1,54 +0,0 @@
/**
* Copyright 2009 Alexander Kuznetsov
*
* 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 org.apache.lucene.morphology.dictionary;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
public class IgnoredFormReader {
private String fileName;
private String fileEncoding = "windows-1251";
public IgnoredFormReader(String fileName) {
this.fileName = fileName;
}
public IgnoredFormReader(String fileName, String fileEncoding) {
this.fileName = fileName;
this.fileEncoding = fileEncoding;
}
public Set<String> getIngnoredFroms() throws IOException {
BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(
new FileInputStream(fileName), fileEncoding));
String s = bufferedReader.readLine();
HashSet<String> result = new HashSet<String>();
while (s != null) {
if (!s.startsWith("//")) {
result.add(s.trim().split(" ")[0]);
}
s = bufferedReader.readLine();
}
return result;
}
}
@@ -25,7 +25,7 @@ import java.io.IOException;
import java.util.*;
//todo made refactoring thi8s class
//todo made refactoring this class
public class StatiticsCollector implements WordProccessor {
private TreeMap<String, Set<Heuristic>> inversIndex = new TreeMap<String, Set<Heuristic>>();
private Map<Set<Heuristic>, Integer> ruleInverIndex = new HashMap<Set<Heuristic>, Integer>();
@@ -27,8 +27,6 @@ import java.util.HashSet;
public class EnglishHeuristicBuilder {
public static void main(String[] args) throws IOException {
//IgnoredFormReader formReader = new IgnoredFormReader("data/igoredFrom.txt");
//Set<String> form = formReader.getIngnoredFroms();
GrammaReader grammaInfo = new GrammaReader("dictonary/Dicts/Morph/egramtab.tab");
DictonaryReader dictonaryReader = new DictonaryReader("dictonary/Dicts/SrcMorph/EngSrc/morphs.mrd", new HashSet<String>());
@@ -27,9 +27,6 @@ import java.util.HashSet;
public class RussianHeuristicBuilder {
public static void main(String[] args) throws IOException {
//IgnoredFormReader formReader = new IgnoredFormReader("data/igoredFrom.txt");
//Set<String> form = formReader.getIngnoredFroms();
GrammaReader grammaInfo = new GrammaReader("dictonary/Dicts/Morph/rgramtab.tab");
DictonaryReader dictonaryReader = new DictonaryReader("dictonary/Dicts/SrcMorph/RusSrc/morphs.mrd", new HashSet<String>());