From: <al...@us...> - 2009-10-02 07:21:26
|
Revision: 2365 http://omegat.svn.sourceforge.net/omegat/?rev=2365&view=rev Author: alex73 Date: 2009-10-02 07:21:17 +0000 (Fri, 02 Oct 2009) Log Message: ----------- Add new match statistics: change package for statistics classes Modified Paths: -------------- trunk/src/org/omegat/core/data/IProject.java trunk/src/org/omegat/core/data/NotLoadedProject.java trunk/src/org/omegat/core/data/RealProject.java trunk/src/org/omegat/gui/editor/EditorController.java trunk/src/org/omegat/gui/filelist/ProjectFrame.java trunk/src/org/omegat/gui/stat/StatisticsWindow.java Added Paths: ----------- trunk/src/org/omegat/core/statistics/ trunk/src/org/omegat/core/statistics/MatchStatisticsCalculationThread.java trunk/src/org/omegat/core/statistics/MatchStatisticsInfo.java trunk/src/org/omegat/core/statistics/StandardStatisticsCalculationThread.java trunk/src/org/omegat/core/statistics/Statistics.java trunk/src/org/omegat/core/statistics/StatisticsInfo.java Removed Paths: ------------- trunk/src/org/omegat/core/data/stat/MatchStatisticsCalculationThread.java trunk/src/org/omegat/core/data/stat/MatchStatisticsInfo.java trunk/src/org/omegat/core/data/stat/StandardStatisticsCalculationThread.java trunk/src/org/omegat/core/data/stat/Statistics.java trunk/src/org/omegat/core/data/stat/StatisticsInfo.java Modified: trunk/src/org/omegat/core/data/IProject.java =================================================================== --- trunk/src/org/omegat/core/data/IProject.java 2009-10-02 06:48:51 UTC (rev 2364) +++ trunk/src/org/omegat/core/data/IProject.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -27,7 +27,7 @@ import java.io.IOException; import java.util.List; -import org.omegat.core.data.stat.StatisticsInfo; +import org.omegat.core.statistics.StatisticsInfo; import org.omegat.filters2.TranslationException; /** Modified: trunk/src/org/omegat/core/data/NotLoadedProject.java =================================================================== --- trunk/src/org/omegat/core/data/NotLoadedProject.java 2009-10-02 06:48:51 UTC (rev 2364) +++ trunk/src/org/omegat/core/data/NotLoadedProject.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -27,7 +27,7 @@ import java.io.IOException; import java.util.List; -import org.omegat.core.data.stat.StatisticsInfo; +import org.omegat.core.statistics.StatisticsInfo; import org.omegat.filters2.TranslationException; /** Modified: trunk/src/org/omegat/core/data/RealProject.java =================================================================== --- trunk/src/org/omegat/core/data/RealProject.java 2009-10-02 06:48:51 UTC (rev 2364) +++ trunk/src/org/omegat/core/data/RealProject.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -42,9 +42,9 @@ import org.omegat.core.Core; import org.omegat.core.CoreEvents; -import org.omegat.core.data.stat.Statistics; -import org.omegat.core.data.stat.StatisticsInfo; import org.omegat.core.events.IProjectEventListener; +import org.omegat.core.statistics.Statistics; +import org.omegat.core.statistics.StatisticsInfo; import org.omegat.filters2.TranslationException; import org.omegat.filters2.master.FilterMaster; import org.omegat.util.FileUtil; Deleted: trunk/src/org/omegat/core/data/stat/MatchStatisticsCalculationThread.java =================================================================== --- trunk/src/org/omegat/core/data/stat/MatchStatisticsCalculationThread.java 2009-10-02 06:48:51 UTC (rev 2364) +++ trunk/src/org/omegat/core/data/stat/MatchStatisticsCalculationThread.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -1,78 +0,0 @@ -/************************************************************************** - OmegaT - Computer Assisted Translation (CAT) tool - with fuzzy matching, translation memory, keyword search, - glossaries, and translation leveraging into updated projects. - - Copyright (C) 2009 Alex Buloichik - Home page: http://www.omegat.org/ - Support center: http://groups.yahoo.com/group/OmegaT/ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - **************************************************************************/ - -package org.omegat.core.data.stat; - -import java.util.List; - -import org.omegat.core.Core; -import org.omegat.core.data.SourceTextEntry; -import org.omegat.core.matching.ISimilarityCalculator; -import org.omegat.core.matching.LevenshteinDistance; -import org.omegat.core.threads.LongProcessThread; - -/** - * Thread for calculate match statistics. - * - * @author Alex Buloichik (ale...@gm...) - */ -public class MatchStatisticsCalculationThread extends LongProcessThread { - private Callback callback; - - public MatchStatisticsCalculationThread(Callback callback) { - this.callback = callback; - } - - public void run() { - ISimilarityCalculator distanceCalculator = new LevenshteinDistance(); - MatchStatisticsInfo result = new MatchStatisticsInfo(); - List<SourceTextEntry> allEntries = Core.getProject().getAllEntries(); - - // We should iterate all segments from all files in project. - int percent = 0; - for (int i = 0; i < allEntries.size(); i++) { - SourceTextEntry ste = allEntries.get(i); - int p = Statistics.getMaxSimilarityPercent(ste, distanceCalculator, - allEntries); - int r = result.getRowByPercent(p); - result.rows[r].segments++; - result.rows[r].words += Statistics.numberOfWords(ste.getSrcText()); - if (isStopped) { - return; - } - int newPercent = i * 100 / allEntries.size(); - if (percent != newPercent) { - callback.showProgress(newPercent); - percent = newPercent; - } - } - callback.displayData(result); - } - - public interface Callback { - void displayData(MatchStatisticsInfo result); - - void showProgress(int percent); - } -} Deleted: trunk/src/org/omegat/core/data/stat/MatchStatisticsInfo.java =================================================================== --- trunk/src/org/omegat/core/data/stat/MatchStatisticsInfo.java 2009-10-02 06:48:51 UTC (rev 2364) +++ trunk/src/org/omegat/core/data/stat/MatchStatisticsInfo.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -1,75 +0,0 @@ -/************************************************************************** - OmegaT - Computer Assisted Translation (CAT) tool - with fuzzy matching, translation memory, keyword search, - glossaries, and translation leveraging into updated projects. - - Copyright (C) 2009 Alex Buloichik - Home page: http://www.omegat.org/ - Support center: http://groups.yahoo.com/group/OmegaT/ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - **************************************************************************/ - -package org.omegat.core.data.stat; - -/** - * Bean for store matches statistics info. - * - * It required 7 rows to output: - * "Exact match","100%","95% - 99%","85% - 94%","75% - 84%",50% - 74%","No - * Match" - * - * @author Alex Buloichik (ale...@gm...) - */ -public class MatchStatisticsInfo { - public final Row[] rows; - - public MatchStatisticsInfo() { - rows = new Row[7]; - for (int i = 0; i < rows.length; i++) { - rows[i] = new Row(); - } - } - - public static class Row { - public int segments, words; - } - - /** - * Get row index by match percent. - * - * @param percent - * match percent - * @return row index - */ - public int getRowByPercent(int percent) { - if (percent == Integer.MAX_VALUE) { - // exact match - return 0; - } else if (percent == 100) { - return 1; - } else if (percent >= 95) { - return 2; - } else if (percent >= 85) { - return 3; - } else if (percent >= 75) { - return 4; - } else if (percent >= 50) { - return 5; - } else { - return 6; - } - } -} Deleted: trunk/src/org/omegat/core/data/stat/StandardStatisticsCalculationThread.java =================================================================== --- trunk/src/org/omegat/core/data/stat/StandardStatisticsCalculationThread.java 2009-10-02 06:48:51 UTC (rev 2364) +++ trunk/src/org/omegat/core/data/stat/StandardStatisticsCalculationThread.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -1,56 +0,0 @@ -/************************************************************************** - OmegaT - Computer Assisted Translation (CAT) tool - with fuzzy matching, translation memory, keyword search, - glossaries, and translation leveraging into updated projects. - - Copyright (C) 2009 Alex Buloichik - Home page: http://www.omegat.org/ - Support center: http://groups.yahoo.com/group/OmegaT/ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - **************************************************************************/ - -package org.omegat.core.data.stat; - -import org.omegat.core.Core; -import org.omegat.core.data.IProject; -import org.omegat.core.threads.LongProcessThread; - -/** - * Thread for calculate standard statistics. - * - * @author Alex Buloichik (ale...@gm...) - */ -public class StandardStatisticsCalculationThread extends LongProcessThread { - private Callback callback; - - public StandardStatisticsCalculationThread(Callback callback) { - this.callback = callback; - } - - public void run() { - IProject p = Core.getProject(); - String result = Statistics.buildProjectStats(p.getUniqueEntries(), p - .getAllEntries(), p.getProjectProperties(), - p.getStatistics().numberofTranslatedSegments); - callback.displayData(result); - } - - public interface Callback { - void displayData(String result); - - void showProgress(int percent); - } -} Deleted: trunk/src/org/omegat/core/data/stat/Statistics.java =================================================================== --- trunk/src/org/omegat/core/data/stat/Statistics.java 2009-10-02 06:48:51 UTC (rev 2364) +++ trunk/src/org/omegat/core/data/stat/Statistics.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -1,326 +0,0 @@ -/************************************************************************** - OmegaT - Computer Assisted Translation (CAT) tool - with fuzzy matching, translation memory, keyword search, - glossaries, and translation leveraging into updated projects. - - Copyright (C) 2000-2006 Keith Godfrey, Maxym Mykhalchuk, and Henry Pijffers - 2007 Zoltan Bartko - 2009 Didier Briel, Alex Buloichik - Home page: http://www.omegat.org/ - Support center: http://groups.yahoo.com/group/OmegaT/ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -**************************************************************************/ - -package org.omegat.core.data.stat; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStreamWriter; -import java.io.Writer; -import java.text.BreakIterator; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; - -import org.omegat.core.Core; -import org.omegat.core.data.ProjectProperties; -import org.omegat.core.data.SourceTextEntry; -import org.omegat.core.data.StringEntry; -import org.omegat.core.data.TransMemory; -import org.omegat.core.matching.FuzzyMatcher; -import org.omegat.core.matching.ISimilarityCalculator; -import org.omegat.core.matching.Tokenizer; -import org.omegat.util.OConsts; -import org.omegat.util.OStrings; -import org.omegat.util.PatternConsts; -import org.omegat.util.StaticUtils; -import org.omegat.util.StringUtil; -import org.omegat.util.Token; - -/** - * Save project statistic into text file. - * - * @author Keith Godfrey - * @author Henry Pijffers (hen...@sa...) - * @author Maxym Mykhalchuk - * @author Zoltan Bartko (bar...@ba...) - * @author Didier Briel - * @author Alex Buloichik (ale...@gm...) - */ -public class Statistics { - /** - * Builds a file with statistic info about the project. The total word & - * character count of the project, the total number of unique segments, plus - * the details for each file. - */ - public static String buildProjectStats(final List<StringEntry> m_strEntryList, - final List<SourceTextEntry> m_srcTextEntryArray, final ProjectProperties m_config, - final int numberofTranslatedSegments) { - int I_WORDS = 0, I_WORDSLEFT = 1, I_CHARSNSP = 2, I_CHARSNSPLEFT = 3, I_CHARS = 4, I_CHARSLEFT = 5; - - int totalWords = 0, uniqueWords = 0, totalCharsNoSpaces = 0, uniqueCharsNoSpaces = 0, totalChars = 0, uniqueChars = 0, remainingUniqueWords = 0, remainingUniqueCharsNoSpaces = 0, remainingUniqueChars = 0, remainingSegments = 0; - - String charWithoutTags; - - for (StringEntry se : m_strEntryList) { - String src = se.getSrcText(); - int dups = se.getParentList().size(); - - int words = numberOfWords(src); - uniqueWords += words; - totalWords += words * dups; - - charWithoutTags = StaticUtils.stripTags(src); - int charsNoSpaces = numberOfCharactersWithoutSpaces(charWithoutTags); - uniqueCharsNoSpaces += charsNoSpaces; - totalCharsNoSpaces += charsNoSpaces * dups; - - int chars = charWithoutTags.length(); - uniqueChars += chars; - totalChars += chars * dups; - - if (!se.isTranslated()) { - remainingUniqueWords += words; - remainingUniqueCharsNoSpaces += charsNoSpaces; - remainingUniqueChars += chars; - remainingSegments += dups; - } - } - - int remainingUniqueSegments = m_strEntryList.size() - numberofTranslatedSegments; - - int remainingWords = 0; - int remainingCharsNoSpaces = 0; - int remainingChars = 0; - Map<String, int[]> counts = new TreeMap<String, int[]>(); - for (SourceTextEntry ste : m_srcTextEntryArray) { - String fileName = ste.getSrcFile().name; - fileName = StaticUtils.makeFilenameRelative(fileName, m_config.getSourceRoot()); - int[] numbers; // [0] - words, [1] - left words - if (counts.containsKey(fileName)) - numbers = counts.get(fileName); - else - numbers = new int[] { 0, 0, 0, 0, 0, 0 }; - - String src = ste.getSrcText(); - charWithoutTags = StaticUtils.stripTags(src); - int words = numberOfWords(src); - numbers[I_WORDS] += words; - int charsNoSpaces = numberOfCharactersWithoutSpaces(charWithoutTags); - numbers[I_CHARSNSP] += charsNoSpaces; - int chars = charWithoutTags.length(); - numbers[I_CHARS] += chars; - - if (!ste.isTranslated()) { - remainingWords += words; - numbers[I_WORDSLEFT] += words; - remainingCharsNoSpaces += charsNoSpaces; - numbers[I_CHARSNSPLEFT] += charsNoSpaces; - remainingChars += chars; - numbers[I_CHARSLEFT] += chars; - } - counts.put(fileName, numbers); - } - - - StringBuilder result=new StringBuilder(); - - try { - // removing old stats - try { - File oldstats = new File(m_config.getProjectInternal() + "word_counts"); // NOI18N - if (oldstats.exists()) - oldstats.delete(); - } catch (Exception e) { - } - - - // now dump file based word counts to disk - String fn = m_config.getProjectInternal() + OConsts.STATS_FILENAME; - Writer ofp = new OutputStreamWriter(new FileOutputStream(fn), OConsts.UTF8); - result.append(OStrings.getString("CT_STATS_Project_Statistics") + "\n\n"); // NOI18N - - // TOTAL - - result.append(OStrings.getString("CT_STATS_Total") + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Segments") + "\t" + m_srcTextEntryArray.size() + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Words") + "\t" + totalWords + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Characters_NOSP") + "\t" + totalCharsNoSpaces + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Characters") + "\t" + totalChars + "\n"); // NOI18N - - // REMAINING - - result.append(OStrings.getString("CT_STATS_Remaining") + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Segments") + "\t" + remainingSegments + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Words") + "\t" + remainingWords + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Characters_NOSP") + "\t" + remainingCharsNoSpaces + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Characters") + "\t" + remainingChars + "\n"); // NOI18N - - // UNIQUE - - result.append(OStrings.getString("CT_STATS_Unique") + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Segments") + "\t" + m_strEntryList.size() + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Words") + "\t" + uniqueWords + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Characters_NOSP") + "\t" + uniqueCharsNoSpaces + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Characters") + "\t" + uniqueChars + "\n"); // NOI18N - - // UNIQUE REMAINING - - result.append(OStrings.getString("CT_STATS_Unique_Remaining") + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Segments") + "\t" + remainingUniqueSegments + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Words") + "\t" + remainingUniqueWords + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Characters_NOSP") + "\t" + remainingUniqueCharsNoSpaces + "\n"); // NOI18N - result.append("\t" + // NOI18N - OStrings.getString("CT_STATS_Characters") + "\t" + remainingUniqueChars + "\n"); - result.append("\n"); // NOI18N - - // STATISTICS BY FILE - - result.append(OStrings.getString("CT_STATS_FILE_Statistics") + "\n\n"); // NOI18N - - result.append(OStrings.getString("CT_STATS_FILE_Name") + "\t" + // NOI18N - OStrings.getString("CT_STATS_FILE_Total_Words") + "\t" + // NOI18N - OStrings.getString("CT_STATS_FILE_Remaining_Words") + "\t" + // NOI18N - OStrings.getString("CT_STATS_FILE_Total_Characters_NOSP") + "\t" + // NOI18N - OStrings.getString("CT_STATS_FILE_Remaining_Characters_NOSP") + "\t" + // NOI18N - OStrings.getString("CT_STATS_FILE_Total_Characters") + "\t" + // NOI18N - OStrings.getString("CT_STATS_FILE_Remaining_Characters") + "\n"); // NOI18N - - for (String filename : counts.keySet()) { - int[] numbers = counts.get(filename); - result.append(filename + "\t" + numbers[I_WORDS] + "\t" + numbers[I_WORDSLEFT] + // NOI18N - "\t" + numbers[I_CHARSNSP] + "\t" + numbers[I_CHARSNSPLEFT] + // NOI18N - "\t" + numbers[I_CHARS] + "\t" + numbers[I_CHARSLEFT] + // NOI18N - "\n"); // NOI18N - } - - ofp.write(result.toString()); - ofp.close(); - - } catch (IOException e) { - } - return result.toString(); - } - - /** - * Calculate max similarity percent for one entry. - * - * @param ste source entry - * @param distanceCalculator calculator - * @param allEntries all entries in project - * @return max similarity percent - */ - public static int getMaxSimilarityPercent(final SourceTextEntry ste, - final ISimilarityCalculator distanceCalculator, - final List<SourceTextEntry> allEntries) { - if (!StringUtil.isEmpty(ste.getTranslation())) { - // segment has translation - should be calculated as - // "Exact matched" - return Integer.MAX_VALUE; - } - - Token[] strTokensStem = Core.getTokenizer().tokenizeAllExactly( - ste.getSrcText()); - int maxSimilarity = 0; // not matched - 0% yet - - /* Travel by project entries. */ - // 'for(int i;;)' much faster than 'for(:)' - for (int i = 0; i < allEntries.size(); i++) { - SourceTextEntry cand = allEntries.get(i); - if (cand == ste) { - // source entry - continue; - } - if (StringUtil.isEmpty(cand.getTranslation())) { - // target without translation - skip - continue; - } - Token[] candTokens = Core.getTokenizer().tokenizeAllExactly( - cand.getSrcText()); - int newSimilarity = FuzzyMatcher.calcSimilarity(distanceCalculator, - strTokensStem, candTokens); - maxSimilarity = Math.max(maxSimilarity, newSimilarity); - } - - /* Travel by TMs. */ - List<TransMemory> tmList = Core.getProject().getTransMemory(); - // 'for(int i;;)' much faster than 'for(:)' - for (int i = 0; i < tmList.size(); i++) { - TransMemory tm = tmList.get(i); - Token[] candTokens = Core.getTokenizer().tokenizeAllExactly( - tm.source); - int newSimilarity = FuzzyMatcher.calcSimilarity(distanceCalculator, - strTokensStem, candTokens); - maxSimilarity = Math.max(maxSimilarity, newSimilarity); - } - return maxSimilarity; - } - - /** Computes the number of characters excluding spaces in a string. */ - private static int numberOfCharactersWithoutSpaces(String str) { - int chars = 0; - for (int i = 0; i < str.length(); i++) { - if (!Character.isSpaceChar(str.charAt(i))) - chars++; - } - return chars; - } - - /** Computes the number of words in a string. */ - public static int numberOfWords(String str) { - int len = str.length(); - if (len == 0) - return 0; - int nTokens = 0; - BreakIterator breaker = Tokenizer.getWordBreaker(); - breaker.setText(str); - - String tokenStr = new String(); - - int start = breaker.first(); - for (int end = breaker.next(); end != BreakIterator.DONE; start = end, end = breaker.next()) { - tokenStr = str.substring(start, end); - boolean word = false; - for (int i = 0; i < tokenStr.length(); i++) { - char ch = tokenStr.charAt(i); - if (Character.isLetterOrDigit(ch)) { - word = true; - break; - } - } - if (word && !PatternConsts.OMEGAT_TAG.matcher(tokenStr).matches()) { - nTokens++; - } - } - return nTokens; - } -} Deleted: trunk/src/org/omegat/core/data/stat/StatisticsInfo.java =================================================================== --- trunk/src/org/omegat/core/data/stat/StatisticsInfo.java 2009-10-02 06:48:51 UTC (rev 2364) +++ trunk/src/org/omegat/core/data/stat/StatisticsInfo.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -1,35 +0,0 @@ -/************************************************************************** - OmegaT - Computer Assisted Translation (CAT) tool - with fuzzy matching, translation memory, keyword search, - glossaries, and translation leveraging into updated projects. - - Copyright (C) 2008 Alex Buloichik - Home page: http://www.omegat.org/ - Support center: http://groups.yahoo.com/group/OmegaT/ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -**************************************************************************/ - -package org.omegat.core.data.stat; - -/** - * Class for store some statistic data. - * @author Alex Buloichik (ale...@gm...) - */ -public class StatisticsInfo { - public int numberofTranslatedSegments; - public int numberOfUniqueSegments; - public int numberOfSegmentsTotal; -} Copied: trunk/src/org/omegat/core/statistics/MatchStatisticsCalculationThread.java (from rev 2364, trunk/src/org/omegat/core/data/stat/MatchStatisticsCalculationThread.java) =================================================================== --- trunk/src/org/omegat/core/statistics/MatchStatisticsCalculationThread.java (rev 0) +++ trunk/src/org/omegat/core/statistics/MatchStatisticsCalculationThread.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -0,0 +1,78 @@ +/************************************************************************** + OmegaT - Computer Assisted Translation (CAT) tool + with fuzzy matching, translation memory, keyword search, + glossaries, and translation leveraging into updated projects. + + Copyright (C) 2009 Alex Buloichik + Home page: http://www.omegat.org/ + Support center: http://groups.yahoo.com/group/OmegaT/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + **************************************************************************/ + +package org.omegat.core.statistics; + +import java.util.List; + +import org.omegat.core.Core; +import org.omegat.core.data.SourceTextEntry; +import org.omegat.core.matching.ISimilarityCalculator; +import org.omegat.core.matching.LevenshteinDistance; +import org.omegat.core.threads.LongProcessThread; + +/** + * Thread for calculate match statistics. + * + * @author Alex Buloichik (ale...@gm...) + */ +public class MatchStatisticsCalculationThread extends LongProcessThread { + private Callback callback; + + public MatchStatisticsCalculationThread(Callback callback) { + this.callback = callback; + } + + public void run() { + ISimilarityCalculator distanceCalculator = new LevenshteinDistance(); + MatchStatisticsInfo result = new MatchStatisticsInfo(); + List<SourceTextEntry> allEntries = Core.getProject().getAllEntries(); + + // We should iterate all segments from all files in project. + int percent = 0; + for (int i = 0; i < allEntries.size(); i++) { + SourceTextEntry ste = allEntries.get(i); + int p = Statistics.getMaxSimilarityPercent(ste, distanceCalculator, + allEntries); + int r = result.getRowByPercent(p); + result.rows[r].segments++; + result.rows[r].words += Statistics.numberOfWords(ste.getSrcText()); + if (isStopped) { + return; + } + int newPercent = i * 100 / allEntries.size(); + if (percent != newPercent) { + callback.showProgress(newPercent); + percent = newPercent; + } + } + callback.displayData(result); + } + + public interface Callback { + void displayData(MatchStatisticsInfo result); + + void showProgress(int percent); + } +} Copied: trunk/src/org/omegat/core/statistics/MatchStatisticsInfo.java (from rev 2364, trunk/src/org/omegat/core/data/stat/MatchStatisticsInfo.java) =================================================================== --- trunk/src/org/omegat/core/statistics/MatchStatisticsInfo.java (rev 0) +++ trunk/src/org/omegat/core/statistics/MatchStatisticsInfo.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -0,0 +1,75 @@ +/************************************************************************** + OmegaT - Computer Assisted Translation (CAT) tool + with fuzzy matching, translation memory, keyword search, + glossaries, and translation leveraging into updated projects. + + Copyright (C) 2009 Alex Buloichik + Home page: http://www.omegat.org/ + Support center: http://groups.yahoo.com/group/OmegaT/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + **************************************************************************/ + +package org.omegat.core.statistics; + +/** + * Bean for store matches statistics info. + * + * It required 7 rows to output: + * "Exact match","100%","95% - 99%","85% - 94%","75% - 84%",50% - 74%","No + * Match" + * + * @author Alex Buloichik (ale...@gm...) + */ +public class MatchStatisticsInfo { + public final Row[] rows; + + public MatchStatisticsInfo() { + rows = new Row[7]; + for (int i = 0; i < rows.length; i++) { + rows[i] = new Row(); + } + } + + public static class Row { + public int segments, words; + } + + /** + * Get row index by match percent. + * + * @param percent + * match percent + * @return row index + */ + public int getRowByPercent(int percent) { + if (percent == Integer.MAX_VALUE) { + // exact match + return 0; + } else if (percent == 100) { + return 1; + } else if (percent >= 95) { + return 2; + } else if (percent >= 85) { + return 3; + } else if (percent >= 75) { + return 4; + } else if (percent >= 50) { + return 5; + } else { + return 6; + } + } +} Copied: trunk/src/org/omegat/core/statistics/StandardStatisticsCalculationThread.java (from rev 2364, trunk/src/org/omegat/core/data/stat/StandardStatisticsCalculationThread.java) =================================================================== --- trunk/src/org/omegat/core/statistics/StandardStatisticsCalculationThread.java (rev 0) +++ trunk/src/org/omegat/core/statistics/StandardStatisticsCalculationThread.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -0,0 +1,56 @@ +/************************************************************************** + OmegaT - Computer Assisted Translation (CAT) tool + with fuzzy matching, translation memory, keyword search, + glossaries, and translation leveraging into updated projects. + + Copyright (C) 2009 Alex Buloichik + Home page: http://www.omegat.org/ + Support center: http://groups.yahoo.com/group/OmegaT/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + **************************************************************************/ + +package org.omegat.core.statistics; + +import org.omegat.core.Core; +import org.omegat.core.data.IProject; +import org.omegat.core.threads.LongProcessThread; + +/** + * Thread for calculate standard statistics. + * + * @author Alex Buloichik (ale...@gm...) + */ +public class StandardStatisticsCalculationThread extends LongProcessThread { + private Callback callback; + + public StandardStatisticsCalculationThread(Callback callback) { + this.callback = callback; + } + + public void run() { + IProject p = Core.getProject(); + String result = Statistics.buildProjectStats(p.getUniqueEntries(), p + .getAllEntries(), p.getProjectProperties(), + p.getStatistics().numberofTranslatedSegments); + callback.displayData(result); + } + + public interface Callback { + void displayData(String result); + + void showProgress(int percent); + } +} Copied: trunk/src/org/omegat/core/statistics/Statistics.java (from rev 2364, trunk/src/org/omegat/core/data/stat/Statistics.java) =================================================================== --- trunk/src/org/omegat/core/statistics/Statistics.java (rev 0) +++ trunk/src/org/omegat/core/statistics/Statistics.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -0,0 +1,326 @@ +/************************************************************************** + OmegaT - Computer Assisted Translation (CAT) tool + with fuzzy matching, translation memory, keyword search, + glossaries, and translation leveraging into updated projects. + + Copyright (C) 2000-2006 Keith Godfrey, Maxym Mykhalchuk, and Henry Pijffers + 2007 Zoltan Bartko + 2009 Didier Briel, Alex Buloichik + Home page: http://www.omegat.org/ + Support center: http://groups.yahoo.com/group/OmegaT/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +**************************************************************************/ + +package org.omegat.core.statistics; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.io.Writer; +import java.text.BreakIterator; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import org.omegat.core.Core; +import org.omegat.core.data.ProjectProperties; +import org.omegat.core.data.SourceTextEntry; +import org.omegat.core.data.StringEntry; +import org.omegat.core.data.TransMemory; +import org.omegat.core.matching.FuzzyMatcher; +import org.omegat.core.matching.ISimilarityCalculator; +import org.omegat.core.matching.Tokenizer; +import org.omegat.util.OConsts; +import org.omegat.util.OStrings; +import org.omegat.util.PatternConsts; +import org.omegat.util.StaticUtils; +import org.omegat.util.StringUtil; +import org.omegat.util.Token; + +/** + * Save project statistic into text file. + * + * @author Keith Godfrey + * @author Henry Pijffers (hen...@sa...) + * @author Maxym Mykhalchuk + * @author Zoltan Bartko (bar...@ba...) + * @author Didier Briel + * @author Alex Buloichik (ale...@gm...) + */ +public class Statistics { + /** + * Builds a file with statistic info about the project. The total word & + * character count of the project, the total number of unique segments, plus + * the details for each file. + */ + public static String buildProjectStats(final List<StringEntry> m_strEntryList, + final List<SourceTextEntry> m_srcTextEntryArray, final ProjectProperties m_config, + final int numberofTranslatedSegments) { + int I_WORDS = 0, I_WORDSLEFT = 1, I_CHARSNSP = 2, I_CHARSNSPLEFT = 3, I_CHARS = 4, I_CHARSLEFT = 5; + + int totalWords = 0, uniqueWords = 0, totalCharsNoSpaces = 0, uniqueCharsNoSpaces = 0, totalChars = 0, uniqueChars = 0, remainingUniqueWords = 0, remainingUniqueCharsNoSpaces = 0, remainingUniqueChars = 0, remainingSegments = 0; + + String charWithoutTags; + + for (StringEntry se : m_strEntryList) { + String src = se.getSrcText(); + int dups = se.getParentList().size(); + + int words = numberOfWords(src); + uniqueWords += words; + totalWords += words * dups; + + charWithoutTags = StaticUtils.stripTags(src); + int charsNoSpaces = numberOfCharactersWithoutSpaces(charWithoutTags); + uniqueCharsNoSpaces += charsNoSpaces; + totalCharsNoSpaces += charsNoSpaces * dups; + + int chars = charWithoutTags.length(); + uniqueChars += chars; + totalChars += chars * dups; + + if (!se.isTranslated()) { + remainingUniqueWords += words; + remainingUniqueCharsNoSpaces += charsNoSpaces; + remainingUniqueChars += chars; + remainingSegments += dups; + } + } + + int remainingUniqueSegments = m_strEntryList.size() - numberofTranslatedSegments; + + int remainingWords = 0; + int remainingCharsNoSpaces = 0; + int remainingChars = 0; + Map<String, int[]> counts = new TreeMap<String, int[]>(); + for (SourceTextEntry ste : m_srcTextEntryArray) { + String fileName = ste.getSrcFile().name; + fileName = StaticUtils.makeFilenameRelative(fileName, m_config.getSourceRoot()); + int[] numbers; // [0] - words, [1] - left words + if (counts.containsKey(fileName)) + numbers = counts.get(fileName); + else + numbers = new int[] { 0, 0, 0, 0, 0, 0 }; + + String src = ste.getSrcText(); + charWithoutTags = StaticUtils.stripTags(src); + int words = numberOfWords(src); + numbers[I_WORDS] += words; + int charsNoSpaces = numberOfCharactersWithoutSpaces(charWithoutTags); + numbers[I_CHARSNSP] += charsNoSpaces; + int chars = charWithoutTags.length(); + numbers[I_CHARS] += chars; + + if (!ste.isTranslated()) { + remainingWords += words; + numbers[I_WORDSLEFT] += words; + remainingCharsNoSpaces += charsNoSpaces; + numbers[I_CHARSNSPLEFT] += charsNoSpaces; + remainingChars += chars; + numbers[I_CHARSLEFT] += chars; + } + counts.put(fileName, numbers); + } + + + StringBuilder result=new StringBuilder(); + + try { + // removing old stats + try { + File oldstats = new File(m_config.getProjectInternal() + "word_counts"); // NOI18N + if (oldstats.exists()) + oldstats.delete(); + } catch (Exception e) { + } + + + // now dump file based word counts to disk + String fn = m_config.getProjectInternal() + OConsts.STATS_FILENAME; + Writer ofp = new OutputStreamWriter(new FileOutputStream(fn), OConsts.UTF8); + result.append(OStrings.getString("CT_STATS_Project_Statistics") + "\n\n"); // NOI18N + + // TOTAL + + result.append(OStrings.getString("CT_STATS_Total") + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Segments") + "\t" + m_srcTextEntryArray.size() + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Words") + "\t" + totalWords + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Characters_NOSP") + "\t" + totalCharsNoSpaces + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Characters") + "\t" + totalChars + "\n"); // NOI18N + + // REMAINING + + result.append(OStrings.getString("CT_STATS_Remaining") + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Segments") + "\t" + remainingSegments + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Words") + "\t" + remainingWords + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Characters_NOSP") + "\t" + remainingCharsNoSpaces + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Characters") + "\t" + remainingChars + "\n"); // NOI18N + + // UNIQUE + + result.append(OStrings.getString("CT_STATS_Unique") + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Segments") + "\t" + m_strEntryList.size() + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Words") + "\t" + uniqueWords + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Characters_NOSP") + "\t" + uniqueCharsNoSpaces + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Characters") + "\t" + uniqueChars + "\n"); // NOI18N + + // UNIQUE REMAINING + + result.append(OStrings.getString("CT_STATS_Unique_Remaining") + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Segments") + "\t" + remainingUniqueSegments + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Words") + "\t" + remainingUniqueWords + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Characters_NOSP") + "\t" + remainingUniqueCharsNoSpaces + "\n"); // NOI18N + result.append("\t" + // NOI18N + OStrings.getString("CT_STATS_Characters") + "\t" + remainingUniqueChars + "\n"); + result.append("\n"); // NOI18N + + // STATISTICS BY FILE + + result.append(OStrings.getString("CT_STATS_FILE_Statistics") + "\n\n"); // NOI18N + + result.append(OStrings.getString("CT_STATS_FILE_Name") + "\t" + // NOI18N + OStrings.getString("CT_STATS_FILE_Total_Words") + "\t" + // NOI18N + OStrings.getString("CT_STATS_FILE_Remaining_Words") + "\t" + // NOI18N + OStrings.getString("CT_STATS_FILE_Total_Characters_NOSP") + "\t" + // NOI18N + OStrings.getString("CT_STATS_FILE_Remaining_Characters_NOSP") + "\t" + // NOI18N + OStrings.getString("CT_STATS_FILE_Total_Characters") + "\t" + // NOI18N + OStrings.getString("CT_STATS_FILE_Remaining_Characters") + "\n"); // NOI18N + + for (String filename : counts.keySet()) { + int[] numbers = counts.get(filename); + result.append(filename + "\t" + numbers[I_WORDS] + "\t" + numbers[I_WORDSLEFT] + // NOI18N + "\t" + numbers[I_CHARSNSP] + "\t" + numbers[I_CHARSNSPLEFT] + // NOI18N + "\t" + numbers[I_CHARS] + "\t" + numbers[I_CHARSLEFT] + // NOI18N + "\n"); // NOI18N + } + + ofp.write(result.toString()); + ofp.close(); + + } catch (IOException e) { + } + return result.toString(); + } + + /** + * Calculate max similarity percent for one entry. + * + * @param ste source entry + * @param distanceCalculator calculator + * @param allEntries all entries in project + * @return max similarity percent + */ + public static int getMaxSimilarityPercent(final SourceTextEntry ste, + final ISimilarityCalculator distanceCalculator, + final List<SourceTextEntry> allEntries) { + if (!StringUtil.isEmpty(ste.getTranslation())) { + // segment has translation - should be calculated as + // "Exact matched" + return Integer.MAX_VALUE; + } + + Token[] strTokensStem = Core.getTokenizer().tokenizeAllExactly( + ste.getSrcText()); + int maxSimilarity = 0; // not matched - 0% yet + + /* Travel by project entries. */ + // 'for(int i;;)' much faster than 'for(:)' + for (int i = 0; i < allEntries.size(); i++) { + SourceTextEntry cand = allEntries.get(i); + if (cand == ste) { + // source entry + continue; + } + if (StringUtil.isEmpty(cand.getTranslation())) { + // target without translation - skip + continue; + } + Token[] candTokens = Core.getTokenizer().tokenizeAllExactly( + cand.getSrcText()); + int newSimilarity = FuzzyMatcher.calcSimilarity(distanceCalculator, + strTokensStem, candTokens); + maxSimilarity = Math.max(maxSimilarity, newSimilarity); + } + + /* Travel by TMs. */ + List<TransMemory> tmList = Core.getProject().getTransMemory(); + // 'for(int i;;)' much faster than 'for(:)' + for (int i = 0; i < tmList.size(); i++) { + TransMemory tm = tmList.get(i); + Token[] candTokens = Core.getTokenizer().tokenizeAllExactly( + tm.source); + int newSimilarity = FuzzyMatcher.calcSimilarity(distanceCalculator, + strTokensStem, candTokens); + maxSimilarity = Math.max(maxSimilarity, newSimilarity); + } + return maxSimilarity; + } + + /** Computes the number of characters excluding spaces in a string. */ + private static int numberOfCharactersWithoutSpaces(String str) { + int chars = 0; + for (int i = 0; i < str.length(); i++) { + if (!Character.isSpaceChar(str.charAt(i))) + chars++; + } + return chars; + } + + /** Computes the number of words in a string. */ + public static int numberOfWords(String str) { + int len = str.length(); + if (len == 0) + return 0; + int nTokens = 0; + BreakIterator breaker = Tokenizer.getWordBreaker(); + breaker.setText(str); + + String tokenStr = new String(); + + int start = breaker.first(); + for (int end = breaker.next(); end != BreakIterator.DONE; start = end, end = breaker.next()) { + tokenStr = str.substring(start, end); + boolean word = false; + for (int i = 0; i < tokenStr.length(); i++) { + char ch = tokenStr.charAt(i); + if (Character.isLetterOrDigit(ch)) { + word = true; + break; + } + } + if (word && !PatternConsts.OMEGAT_TAG.matcher(tokenStr).matches()) { + nTokens++; + } + } + return nTokens; + } +} Copied: trunk/src/org/omegat/core/statistics/StatisticsInfo.java (from rev 2364, trunk/src/org/omegat/core/data/stat/StatisticsInfo.java) =================================================================== --- trunk/src/org/omegat/core/statistics/StatisticsInfo.java (rev 0) +++ trunk/src/org/omegat/core/statistics/StatisticsInfo.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -0,0 +1,35 @@ +/************************************************************************** + OmegaT - Computer Assisted Translation (CAT) tool + with fuzzy matching, translation memory, keyword search, + glossaries, and translation leveraging into updated projects. + + Copyright (C) 2008 Alex Buloichik + Home page: http://www.omegat.org/ + Support center: http://groups.yahoo.com/group/OmegaT/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +**************************************************************************/ + +package org.omegat.core.statistics; + +/** + * Class for store some statistic data. + * @author Alex Buloichik (ale...@gm...) + */ +public class StatisticsInfo { + public int numberofTranslatedSegments; + public int numberOfUniqueSegments; + public int numberOfSegmentsTotal; +} Modified: trunk/src/org/omegat/gui/editor/EditorController.java =================================================================== --- trunk/src/org/omegat/gui/editor/EditorController.java 2009-10-02 06:48:51 UTC (rev 2364) +++ trunk/src/org/omegat/gui/editor/EditorController.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -53,10 +53,10 @@ import org.omegat.core.data.IProject; import org.omegat.core.data.SourceTextEntry; import org.omegat.core.data.StringEntry; -import org.omegat.core.data.stat.StatisticsInfo; import org.omegat.core.events.IEntryEventListener; import org.omegat.core.events.IFontChangedEventListener; import org.omegat.core.events.IProjectEventListener; +import org.omegat.core.statistics.StatisticsInfo; import org.omegat.gui.help.HelpFrame; import org.omegat.gui.main.DockableScrollPane; import org.omegat.gui.main.MainWindow; Modified: trunk/src/org/omegat/gui/filelist/ProjectFrame.java =================================================================== --- trunk/src/org/omegat/gui/filelist/ProjectFrame.java 2009-10-02 06:48:51 UTC (rev 2364) +++ trunk/src/org/omegat/gui/filelist/ProjectFrame.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -78,10 +78,10 @@ import org.omegat.core.CoreEvents; import org.omegat.core.data.IProject; import org.omegat.core.data.StringEntry; -import org.omegat.core.data.stat.StatisticsInfo; import org.omegat.core.events.IEntryEventListener; import org.omegat.core.events.IFontChangedEventListener; import org.omegat.core.events.IProjectEventListener; +import org.omegat.core.statistics.StatisticsInfo; import org.omegat.gui.main.MainWindow; import org.omegat.util.OConsts; import org.omegat.util.OStrings; Modified: trunk/src/org/omegat/gui/stat/StatisticsWindow.java =================================================================== --- trunk/src/org/omegat/gui/stat/StatisticsWindow.java 2009-10-02 06:48:51 UTC (rev 2364) +++ trunk/src/org/omegat/gui/stat/StatisticsWindow.java 2009-10-02 07:21:17 UTC (rev 2365) @@ -41,9 +41,9 @@ import org.omegat.core.Core; -import org.omegat.core.data.stat.StandardStatisticsCalculationThread; -import org.omegat.core.data.stat.MatchStatisticsCalculationThread; -import org.omegat.core.data.stat.MatchStatisticsInfo; +import org.omegat.core.statistics.MatchStatisticsCalculationThread; +import org.omegat.core.statistics.MatchStatisticsInfo; +import org.omegat.core.statistics.StandardStatisticsCalculationThread; import org.omegat.core.threads.LongProcessThread; import org.omegat.util.Log; import org.omegat.util.OConsts; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |