56 fragments duplicated

2574 lines duplicated

612 lines duplicated in:

Line 28 of /core/carrot2-core/src-test/org/carrot2/core/test/SampleDocumentData.java
Line 24 of /applications/carrot2-examples/examples/org/carrot2/examples/SampleDocumentData.java
public final class SampleDocumentData { public final static List<Document> DOCUMENTS_DATA_MINING; static { final String [][] data = new String [] [] { { "http://en.wikipedia.org/wiki/Data_mining", "Data mining - Wikipedia, the free encyclopedia", "Article about knowledge-discovery in databases (KDD), the practice of automatically searching large stores of data for patterns." }, { "http://www.ccsu.edu/datamining/resources.html", "CCSU - Data Mining", "A collection of Data Mining links edited by the Central Connecticut State University ... Graduate Certificate Program. Data Mining Resources. Resources. Groups ..." }, { "http://www.kdnuggets.com/", "KDnuggets: Data Mining, Web Mining, and Knowledge Discovery", "Newsletter on the data mining and knowledge industries, offering information on data mining, knowledge discovery, text mining, and web mining software, courses, jobs, publications, and meetings." }, { "http://en.wikipedia.org/wiki/Data-mining", "Data mining - Wikipedia, the free encyclopedia", "Data mining is considered a subfield within the Computer Science field of knowledge discovery. ... claim to perform \"data mining\" by automating the creation ..." }, { "http://www.anderson.ucla.edu/faculty/jason.frand/teacher/technologies/palace/datamining.htm", "Data Mining: What is Data Mining?", "Outlines what knowledge discovery, the process of analyzing data from different perspectives and summarizing it into useful information, can do and how it works." }, { "http://www.the-data-mine.com/", "Data Mining - Home Page (Misc)", "Provides information about data mining also known as knowledge discovery in databases (KDD) or simply knowledge discovery. List software, events, organizations, and people working in data mining." }, { "http://www.spss.com/data_mining/", "Data Mining Software, Data Mining Applications and Data Mining Solutions", "... complete data mining customer ... Data mining applications, on the other hand, embed ... it, our daily lives are influenced by data mining applications. ..." }, { "http://datamining.typepad.com/data_mining/", "Data Mining: Text Mining, Visualization and Social Media", "Commentary on text mining, data mining, social media and data visualization. ... Opinion Mining Startups ... in sentiment mining, deriving tuples of ..." }, { "http://www.statsoft.com/textbook/stdatmin.html", "Data Mining Techniques", "Outlines the crucial concepts in data mining, defines the data warehousing process, and offers examples of computational and graphical exploratory data analysis techniques." }, { "http://answers.yahoo.com/question/index?qid=1006040419333", "<b>answers.yahoo.com</b>/question/index?qid=1006040419333", "Generally, data mining (sometimes called data or knowledge discovery) is the ... Midwest grocery chain used the data mining capacity of Oracle software to ..." }, { "http://www.ccsu.edu/datamining/master.html", "CCSU - Data Mining", "Details on how to apply to the Master of Science in data mining may be found here. ... All data mining majors are classified for business purposes as part-time ..." }, { "http://databases.about.com/od/datamining/a/datamining.htm", "Data Mining: An Introduction", "About.com article on how businesses are discovering new trends and patterns of behavior that previously went unnoticed through data mining, automated statistical analysis techniques." }, { "http://www.thearling.com/", "Data Mining and Analytic Technologies (Kurt Thearling)", "Kurt Thearling's site dedicated to sharing information about data mining, the automated extraction of hidden predictive information from databases, and other analytic technologies." }, { "http://www.sas.com/technologies/analytics/datamining/index.html", "Data Mining Software and Text Mining | SAS", "Data mining is the process of selecting, exploring and modeling large amounts of ... The knowledge gleaned from data and text mining can be used to fuel ..." }, { "http://databases.about.com/od/datamining/Data_Mining_and_Data_Warehousing.htm", "Data Mining and Data Warehousing", "From data mining tutorials to data warehousing techniques, you'll find it all! ... Administration Design Development Data Mining Database Training Careers Reviews ..." }, { "http://www.oracle.com/technology/products/bi/odm/index.html", "Oracle Data Mining", "Oracle Data Mining Product Center ... Using data mining functionality embedded in Oracle Database 10g, you can find ... Mining High-Dimensional Data for ..." }, { "http://www.ncdm.uic.edu/", "National Center for Data Mining - Welcome", "Conducts research in: scaling algorithms, applications and systems to massive data sets, developing algorithms, applications, and systems for mining distributed data, and establishing standard languages, protocols, and services for data mining and predictive modeling." }, { "http://research.microsoft.com/dmx/DataMining/default.aspx", "Data Mining Project", "A long term Knowledge Discovery and Data Mining project which has the current ... Read more about how data mining is integrated into SQL server. Contact Us ..." }, { "http://www.dmg.org/", "Data Mining Group - DMG", "... high performance networking, internet computing, data mining and related areas. ... Peter Stengard, Oracle Data Mining Technologies. prudsys AG, Chemnitz, ..." }, { "http://datamining.typepad.com/data_mining/2006/05/the_truth_about.html", "Data Mining: Text Mining, Visualization and Social Media: The Truth About Blogs", "Commentary on text mining, data mining, social media and data visualization. ... Data Mining points to the latest papers from the 3rd International Workshop on ..." }, { "http://searchsqlserver.techtarget.com/sDefinition/0,,sid87_gci211901,00.html", "What is data mining? - a definition from Whatis.com - see also: data miner, data analysis", "Data mining is the analysis of data for relationships that have not previously been discovered. ... Data mining techniques are used in a many research areas, ..." }, { "http://www.thearling.com/text/dmwhite/dmwhite.htm", "An Introduction to Data Mining", "Data mining, the extraction of hidden predictive information from large ... prospective analyses offered by data mining move beyond the analyses of ..." }, { "http://www.oracle.com/solutions/business_intelligence/data-mining.html", "Oracle Data Mining", "Using data mining functionality embedded in ... Oracle Data Mining JDeveloper and SQL Developer ... Oracle Magazine: Using the Oracle Data Mining API ..." }, { "http://www.amazon.com/tag/data%20mining", "Amazon.com: data mining", "A community about data mining. Tag and discover new products. ... Data Mining (Paperback) Data Mining: Practical Machine Learning Tools and Techniques, Second Edition ..." }, { "http://ocw.mit.edu/OcwWeb/Sloan-School-of-Management/15-062Data-MiningSpring2003/CourseHome/index.htm", "MIT OpenCourseWare | Sloan School of Management | 15.062 Data Mining, Spring 2003 | Home", "... class of methods known as data mining that assists managers in recognizing ... Data mining is a rapidly growing field that is concerned with developing ..." }, { "http://www.sas.com/offices/europe/sweden/2746.html", "Om Data Mining och Text Mining. Ta fram s\u00E4kra beslutsunderlag med Data Miningverktyg fr\u00E5n SAS Institute.", "SAS Insitutes business intelligence ger v\u00E4rdefull kunskap till hela din ... Till\u00E4mpningen av data mining str\u00E4cker sig \u00F6ver m\u00E5nga branscher och omr\u00E5den. ..." }, { "http://www.dmoz.org/Computers/Software/Databases/Data_Mining/", "Open Directory - Computers: Software: Databases: Data Mining", "Data Mining and Knowledge Discovery - A peer-reviewed journal publishing ... In assessing the potential of data mining based marketing campaigns one needs to ..." }, { "http://www.investorhome.com/mining.htm", "Investor Home - Data Mining", "Data Mining or Data Snooping is the practice of searching for relationships and ... up by making a case study in data mining out of the Motley Fool's Foolish Four. ..." }, { "http://www.amazon.com/Data-Mining-Concepts-Techniques-Management/dp/1558604898", "Amazon.com: Data Mining: Concepts and Techniques (The Morgan Kaufmann Series in Data Management Systems): Jiawei Han...", "Amazon.com: Data Mining: Concepts and Techniques (The Morgan Kaufmann Series in Data Management Systems): Jiawei Han,Micheline Kamber: Books" }, { "http://www.monografias.com/trabajos/datamining/datamining.shtml", "Data Mining - Monografias.com", "Data Mining, la extracci\u00F3n de informaci\u00F3n oculta y predecible de grandes bases ... Las herramientas de Data Mining predicen futuras tendencias y comportamientos, ..." }, { "http://www.megaputer.com/data_mining.php", "Data Mining Technology - Megaputer", "Data Mining Technology from Megaputer ... Typical tasks addressed by data mining include: ... Yet, data mining requires far more than just machine learning. ..." }, { "http://datamining.itsc.uah.edu/", "itsc data mining solutions center", "" }, { "http://www.dmreview.com/specialreports/20050503/1026882-1.html", "Hard Hats for Data Miners: Myths and Pitfalls of Data Mining", "This article debunks several myths about data mining and presents a plan of action to avoid some of the pitfalls. ... a typical data mining conference or ..." }, { "http://research.microsoft.com/dmx/", "Data Management, Exploration and Mining- Home", "The Data Management Exploration and Mining Group (DMX) ... Our research effort in data mining focuses on ensuring that traditional ..." }, { "http://www.biomedcentral.com/info/about/datamining", "BioMed Central | about us | Data mining research", "... a collection of links to publications on the subject of biomedical text mining. Data mining Open Access research - an article in the 8 September 2003 edition of ..." }, { "http://www.datapult.com/Data_Mining.htm", "Data Mining", "Data Mining Services provide customers with tools to quickly sift through the ... into Datapult Central for use with Data Mining tools and other Datapult products. ..." }, { "http://www.siam.org/meetings/sdm02/", "SIAM International Conference on Data Mining", "SIAM International Conference on Data Mining, co-Sponsored by AHPCRC and ... Clustering High Dimensional Data and its Applications. Mining Scientific Datasets ..." }, { "http://dir.yahoo.com/Computers_and_Internet/Software/Databases/Data_Mining/", "Data Mining in the Yahoo! Directory", "Learn about data mining and knowledge discovery, the process of finding patterns ... Cross Industry Standard Process for Data Mining (CRISP-DM) ..." }, { "http://www.llnl.gov/str/Kamath.html", "Data Mining", "... Sapphire-a semiautomated, flexible data-mining software infrastructure. ... Data mining is not a new field. ... scale, scientific data-mining efforts such ..." }, { "http://www.sqlserverdatamining.com/", "SQL Server Data Mining > Home", "SQL Server Data Mining Portal ... information about our exciting data mining features. ... CTP of Microsoft SQL Server 2008 Data Mining Add-Ins for Office 2007 ..." }, { "http://www.dbmsmag.com/9807m01.html", "DBMS - DBMS Data Mining Solutions Supplement", "As recently as two years ago, data mining was a new concept for many people. Data mining products were new and marred by unpolished interfaces. ..." }, { "http://www.oclc.org/research/projects/mining", "Data mining [OCLC - Projects]", "Describes the goals, methodology, and timing of the Data mining project." }, { "http://www.the-data-mine.com/bin/view/Misc/IntroductionToDataMining", "Data Mining - Introduction To Data Mining (Misc)", "Some example application areas are listed under Applications Of Data Mining ... Crows Introduction - \"Introduction to Data Mining and Knowledge Discovery\"- http: ..." }, { "http://www.pentaho.com/products/data_mining/", "Pentaho Commercial Open Source Business Intelligence: Data Mining", "... (BI) to the next level by adding data mining and workflow to the mix. ... Pentaho Data Mining is differentiated by its open, standards-compliant nature, ..." }, { "http://www.unf.edu/~selfayou/html/data_mining.html", "Data Mining", "This course approaches data mining topics from an Artificial Intelligence ... The course will also cover Applications and Trends in Data Mining. Textbook: ..." }, { "http://www.statsoft.com/products/dataminer.htm", "Data Mining Software & Predictive Modeling Solutions", "data mining software & predictive modeling sold online by statsoft.com. ... of automated and ready-to-deploy data mining solutions for a wide variety of ..." }, { "http://gosset.wharton.upenn.edu/wiki/index.php/Main_Page", "Main Page - Knowledge Discovery", "The Penn Data Mining Group develops principled means of modeling and ... knowledge of specific application areas to develop new approaches to data mining. ..." }, { "http://www.twocrows.com/glossary.htm", "Two Crows: Data mining glossary", "Data mining terms concisely defined. ... Accuracy is an important factor in assessing the success of data mining. ... data mining ..." }, { "http://www.cdc.gov/niosh/mining/data/", "NIOSH Mining: MSHA Data File Downloads | CDC/NIOSH", "MSHA accident, injury, employment, and production data files in SPSS and dBase formats ... Data files on mining accidents, injuries, fatalities, employment, ..." }, { "http://www.cartdatamining.com/", "Salford Data mining 2006", "Objective | Previous Conferences | Call for Abstracts | LATEST INFO ..." }, { "http://www.inductis.com/", "Data Mining | Focused Data Mining For Discovery To Assist Management", "Inductis offers high-level data mining services to assist management decisions ... The Data Mining Shootout ...more>> ISOTech 2006 - The Insurance Technology ..." }, { "http://www.datamininglab.com/", "Elder Research: Predictive Analytics & Data Mining Consulting", "Provides consulting and short courses in data mining and pattern discovery patterns in data." }, { "http://www.microsoft.com/sql/technologies/dm/default.mspx", "Microsoft SQL Server: Data Mining", "Microsoft SQL Server Data Mining helps you explore your business data and discover patterns to reveal the hidden trends about your products, customer, market, and ..." }, { "http://www.dataminingcasestudies.com/", "Data Mining Case Studies", "Recognizing outstanding practical contributions in the field of data mining. ... case studies are one of the most discussed topics at data mining conferences. ..." }, { "http://www.webopedia.com/TERM/D/data_mining.html", "What is data mining? - A Word Definition From the Webopedia Computer Dictionary", "This page describes the term data mining and lists other pages on the Web where you can find additional information. ... Data Mining and Analytic Technologies ..." }, { "http://www.cs.waikato.ac.nz/~ml/weka/book.html", "Data Mining: Practical Machine Learning Tools and Techniques", "Book. Data Mining: Practical Machine Learning Tools and Techniques (Second Edition) ... Explains how data mining algorithms work. ..." }, { "http://www.datamining.com/", "Predictive Modeling and Predictive Analytics Solutions | Enterprise Miner Software from Insightful Software", "Insightful Enterprise Miner - Enterprise data mining for predictive modeling and predictive analytics." }, { "http://www.sra.com/services/index.asp?id=153", "SRA International - Data Mining Solutions", "... and business who ask these questions are finding solutions through data mining. ... Data mining is the process of discovering previously unknown relationships in ..." }, { "http://en.wiktionary.org/wiki/data_mining", "data mining - Wiktionary", "Data mining. Wikipedia. data mining. a technique for searching large-scale databases for patterns; used mainly to ... Czech: data mining n., dolov\u00E1n\u00ED dat n. ..." }, { "http://www.datamining.org/", "data mining institute", "" }, { "http://videolectures.net/Top/Computer_Science/Data_Mining/", "Videolectures category: Data Mining", "Next Generation Data Mining Tools: Power laws and self-similarity for graphs, ... Parallel session 4 - Hands-on section Data mining with R. Luis Torgo. 1 comment ..." }, { "http://www2008.org/CFP/RP-data_mining.html", "WWW2008 CFP - WWW 2008 Call For Papers: Refereed Papers - Data Mining", "WWW2008 - The 17th International World Wide Web Conference - Beijing, China (21 - 25 April 2008) Hosted by Beihang Universit ... data mining, machine ..." }, { "http://answers.yahoo.com/question/index?qid=20070227091350AAVDlI1", "what is data mining?", "... the purchases of customers, a data mining system could identify those customers ... A simple example of data mining, often called Market Basket Analysis, ..." }, { "http://clubs.yahoo.com/clubs/datamining", "datamining2 : Data Mining Club - 1600+ members!!", "datamining2: Data Mining Club - 1600+ members!" }, { "http://www.siam.org/meetings/sdm01/", "First SIAM International Conference on Data Mining", "The field of data mining draws upon extensive work in areas such as statistics, ... recent results in data mining, including applications, algorithms, software, ..." }, { "http://www.statserv.com/datamining.html", "St@tServ - About Data Mining", "St@tServ Data Mining page ... Data mining in molecular biology, by Alvis Brazma. Graham Williams page. Knowledge Discovery and Data Mining Resources, ..." }, { "http://www.springer.com/computer/database+management+&+information+retrieval/journal/10618", "Data Mining and Knowledge Discovery - Data Mining and Knowledge Discovery Journals, Books & Online Media | Springer", "Technical journal focused on the theory, techniques, and practice for extracting information from large databases." }, { "http://msdn2.microsoft.com/en-us/library/ms174949.aspx", "Data Mining Concepts", "Data mining is frequently described as &quot;the process of extracting ... Creating a data mining model is a dynamic and iterative process. ..." }, { "http://www.cs.wisc.edu/dmi/", "DMI:Data Mining Institute", "Data Mining Institute at UW-Madison ... The Data Mining Institute (DMI) was ... Corporation with the support of the Data Mining Group of Microsoft Research. ..." }, { "http://www.dataminingconsultant.com/", "DataMiningConsultant.com", "... Website for Data Mining Methods and ... data mining at Central Connecticut State University, he ... also provides data mining consulting and statistical ..." }, { "http://www.dmreview.com/channels/data_mining.html", "Data Mining", "... business intelligence, data warehousing, data mining, CRM, analytics, ... M2007 Data Mining Conference Hitting 10th Year and Going Strong ..." }, { "http://www.unc.edu/~xluan/258/datamining.html", "Data Mining", "What is the current state of data mining? The immediate future ... Data Mining is the process of extracting knowledge hidden from large volumes of ..." }, { "http://www.data-miners.com/", "Data Miners Inc. We wrote the book on data mining!", "Data mining consultancy; services include predictive modeling, consulting, and seminars." }, { "http://www.versiontracker.com/dyn/moreinfo/macosx/27607", "Data Mining 2.2.2 software download - Mac OS X - VersionTracker", "Find Data Mining downloads, reviews, and updates for Mac OS X including commercial software, shareware and freeware on VersionTracker.com." }, { "http://www.webtechniques.com/archives/2000/01/greening/", "New Architect: Features", "Article by Dan Greening on data mining techniques applied to analyzing and making decisions from web data. ... and business analysts use data-mining techniques. ..." }, { "http://www.networkdictionary.com/software/DataMining.php", "Data Mining | NetworkDictionary", "Data Mining is the automated extraction of hidden predictive information from databases. ... The data mining tools can make this leap. ..." }, { "http://www.youtube.com/watch?v=wqpMyQMi0to", "YouTube - What is Data Mining? - February 19, 2008", "Association Labratory President and CEO Dean West discusses Data Mining and how it can be applied to associations. ... Data Mining Association Forum Dean West ..." }, { "http://www.cs.sfu.ca/~han/DM_Book.html", "Book page", "Chapter 4. Data Mining Primitives, Languages, and System Architectures ... Chapter 9. Mining Complex Types of Data ... to Microsoft's OLE DB for Data Mining ..." }, { "http://www.twocrows.com/", "Two Crows data mining home page", "Dedicated to the development, marketing, sales and support of tools for knowledge discovery to make data mining accessible and easy to use." }, { "http://www.autonlab.org/tutorials", "Statistical Data Mining Tutorials", "Includes a set of tutorials on many aspects of statistical data mining, including the foundations of probability, the foundations of statistical data analysis, and most of the classic machine learning and data mining algorithms." }, { "http://ecommerce.ncsu.edu/technology/topic_Datamining.html", "E-commerce Technology: Data Mining", "\"Web usage mining: discovery and applications of web usage patterns from web data\" ... Patterns and Trends by Applying OLAP and Data Mining Technology on Web Logs. ..." }, { "http://www.teradata.com/t/page/106002/index.html", "Teradata Data Mining Warehouse Solution", "... a high-powered analytic warehouse that streamlines the data mining process. ... while building the analytic model using your favorite data mining tool. ..." }, { "http://datamining.japati.net/", "Indo Datamining", "Apa yang bisa dan tidak bisa dilakukan data mining ? ... Iko Pramudiono \"&raquo ... Apa itu data mining ? Iko Pramudiono \"&raquo. artikel lainnya \" tutorial ..." }, { "http://www.affymetrix.com/products/software/specific/dmt.affx", "Affymetrix - Data Mining Tool (DMT) (Unsupported - Archived Product)", "Affymetrix is dedicated to developing state-of-the-art technology for acquiring, analyzing, and managing complex genetic ... The Data Mining Tool (DMT) ..." }, { "http://www.pcc.qub.ac.uk/tec/courses/datamining/stu_notes/dm_book_1.html", "Data Mining Student Notes, QUB", "2 - Data Mining Functions. 2.1 - Classification. 2.2 - Associations ... 5 - Data Mining Examples. 5.1 - Bass Brewers. 5.2 - Northern Bank. 5.3 - TSB Group PLC ..." }, { "http://www.spss.com/text_mining_for_clementine/", "Text Mining for Clementine | Improve the accuracy of data mining", "Text Mining for Clementine from SPSS enables you to use text data to improve the accuracy of predictive models. ... and about data mining in general. ..." }, { "http://www.open-mag.com/features/Vol_16/datamining/datamining.htm", "Data Mining", "Without data mining, a merchant isn't even close to leveraging what customers want and will buy. ... Data mining is to be found in applications like bio ..." }, { "http://wordpress.com/tag/data-mining/", "Data Mining \u2014 Blogs, Pictures, and more on WordPress", "Going Beyond the Numbers: Context-Sensitive Data Mining ... Data mining examples ... many websites employing data mining technology to provide recommendation ..." }, { "http://www.dmbenchmarking.com/", "Benchmarking- Data Mining Benchmarking Association", "Association of companies and organizations working to identify \"best in class\" data mining processes through benchmarking studies." }, { "http://www.dataentryindia.com/data_processing/data_mining.php", "Data Mining, Data Mining Process, Data Mining Techniques, Outsourcing Mining Data Services", "... Walmart, Fundraising Data Mining, Data Mining Activities, Web-based Data Mining, ... in many industries makes us the best choice for your data mining needs. ..." }, { "http://www.target.com/Data-Mining-Applications-International-Information/dp/1853127299", "Data Mining V: Data Mining, Text Mining... [Hardcover] | Target.com", "Shop for Data Mining V: Data Mining, Text Mining and Their Business Applications : Fifth International Conference on Data Mining (Management Information System) at" }, { "http://www.cs.ubc.ca/~rng/research/datamining/data_mining.htm", "Data Mining", "... varying degrees of success, the data mining tools developed thus far, by and ... (a) we should recognize that data mining is a multi-step process, and that (b) ..." }, { "http://jcp.org/en/jsr/detail?id=73", "The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 73", "Currently, there is no widely agreed upon, standard API for data mining. By using JDMAPI, implementers of data mining applications can expose a single, ..." }, { "http://www.microsoft.com/spain/sql/technologies/dm/default.mspx", "Microsoft SQL Server2005: Data Mining", "Data Mining es la tecnolog\u00EDa BI que le ayudar\u00E1 a construir modelos anal\u00EDticos complejos e integrar esos modelos con sus operaciones comerciales." }, { "http://www.bos.frb.org/economic/nerr/rr2000/q3/mining.htm", "Regional Review: Mining Data", "Although data mining by itself is not going to get the Celtics to the playoffs, ... then, firms that specialize in data-mining software have been developing a ..." }, { "http://www.scianta.com/technology/datamining.htm", "Data Mining", "... are excellent candidates for data mining, fault prediction, problem diagnosis, ... Data Mining uses this theory to support Link and Affinity Group analysis \u2013 an ..." }, { "http://www.gusconstan.com/DataMining/index.htm", "Discovery and Mining", "Verification-Driven Data Mining. Advantages of Symbolic Classifiers. Manual vs. Automatic ... Currently, data mining solutions have been developed by large software ..." }, { "http://www.dataminingconsultant.com/DKD.htm", "DataMiningConsultant.com", "Companion Website for Data Mining Methods and Models ... \"This is an excellent introductory book on data mining. ... An Introduction to Data Mining at Amazon.com ..." }, { "http://www.pfaw.org/pfaw/general/default.aspx?oid=9717", "People For the American Way - Data Mining", "data mining, civil liberties, civil rights, terrorism, september 11th, anti-terrorism, ashcroft, government intrusion, privacy, email, patriot, american" }, { "http://dm1.cs.uiuc.edu/", "Data Mining Research Group", "... conducting research in various areas in data mining and other related fields. ... on Data Mining (SDM'08), (full paper), Atlanta, GA, April 2007. ..." } }; final ArrayList<Document> documents = new ArrayList<Document>(); for (String [] row : data) { documents.add(new Document(row[1], row[2], row[0])); } DOCUMENTS_DATA_MINING = Collections.unmodifiableList(documents); }

55 lines duplicated in:

Line 904 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1100 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
T partionValue = array[middle]; int a, b, c, d; a = b = start; c = d = end - 1; while (true) { int comparison; while (b <= c && (comparison = comp.compare(array[b], partionValue)) <= 0) { if (comparison == 0) { temp = array[a]; array[a++] = array[b]; array[b] = temp; } b++; } while (c >= b && (comparison = comp.compare(array[c], partionValue)) >= 0) { if (comparison == 0) { temp = array[c]; array[c] = array[d]; array[d--] = temp; } c--; } if (b > c) { break; } temp = array[b]; array[b++] = array[c]; array[c--] = temp; } length = a - start < b - a ? a - start : b - a; int l = start; int h = b - length; while (length-- > 0) { temp = array[l]; array[l++] = array[h]; array[h++] = temp; } length = d - c < end - 1 - d ? d - c : end - 1 - d; l = b; h = end - length; while (length-- > 0) { temp = array[l]; array[l++] = array[h]; array[h++] = temp; } if ((length = b - a) > 0) { quickSort0(start, start + length, array, comp); } if ((length = d - c) > 0) { quickSort0(end - length, end, array, comp); } } public static void quickSort(short[] array, int start, int end,

55 lines duplicated in:

Line 724 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 814 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
float partionValue = array[middle]; int a, b, c, d; a = b = start; c = d = end - 1; while (true) { int comparison; while (b <= c && (comparison = comp.compare(partionValue, array[b])) >= 0) { if (comparison == 0) { temp = array[a]; array[a++] = array[b]; array[b] = temp; } b++; } while (c >= b && (comparison = comp.compare(array[c], partionValue)) >= 0) { if (comparison == 0) { temp = array[c]; array[c] = array[d]; array[d--] = temp; } c--; } if (b > c) { break; } temp = array[b]; array[b++] = array[c]; array[c--] = temp; } length = a - start < b - a ? a - start : b - a; int l = start; int h = b - length; while (length-- > 0) { temp = array[l]; array[l++] = array[h]; array[h++] = temp; } length = d - c < end - 1 - d ? d - c : end - 1 - d; l = b; h = end - length; while (length-- > 0) { temp = array[l]; array[l++] = array[h]; array[h++] = temp; } if ((length = b - a) > 0) { quickSort0(start, start + length, array, comp); } if ((length = d - c) > 0) { quickSort0(end - length, end, array, comp); } } public static void quickSort(int[] array, int start, int end,

55 lines duplicated in:

Line 415 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 634 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 904 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
int partionValue = array[middle]; int a, b, c, d; a = b = start; c = d = end - 1; while (true) { int comparison; while (b <= c && (comparison = comp.compare(array[b], partionValue)) <= 0) { if (comparison == 0) { temp = array[a]; array[a++] = array[b]; array[b] = temp; } b++; } while (c >= b && (comparison = comp.compare(array[c], partionValue)) >= 0) { if (comparison == 0) { temp = array[c]; array[c] = array[d]; array[d--] = temp; } c--; } if (b > c) { break; } temp = array[b]; array[b++] = array[c]; array[c--] = temp; } length = a - start < b - a ? a - start : b - a; int l = start; int h = b - length; while (length-- > 0) { temp = array[l]; array[l++] = array[h]; array[h++] = temp; } length = d - c < end - 1 - d ? d - c : end - 1 - d; l = b; h = end - length; while (length-- > 0) { temp = array[l]; array[l++] = array[h]; array[h++] = temp; } if ((length = b - a) > 0) { quickSort0(start, start + length, array, comp); } if ((length = d - c) > 0) { quickSort0(end - length, end, array, comp); } } public static void quickSort(long[] array, int start, int end,

55 lines duplicated in:

Line 415 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 994 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
long partionValue = array[middle]; int a, b, c, d; a = b = start; c = d = end - 1; while (true) { int comparison; while (b <= c && (comparison = comp.compare(array[b], partionValue)) <= 0) { if (comparison == 0) { temp = array[a]; array[a++] = array[b]; array[b] = temp; } b++; } while (c >= b && (comparison = comp.compare(array[c], partionValue)) >= 0) { if (comparison == 0) { temp = array[c]; array[c] = array[d]; array[d--] = temp; } c--; } if (b > c) { break; } temp = array[b]; array[b++] = array[c]; array[c--] = temp; } length = a - start < b - a ? a - start : b - a; int l = start; int h = b - length; while (length-- > 0) { temp = array[l]; array[l++] = array[h]; array[h++] = temp; } length = d - c < end - 1 - d ? d - c : end - 1 - d; l = b; h = end - length; while (length-- > 0) { temp = array[l]; array[l++] = array[h]; array[h++] = temp; } if ((length = b - a) > 0) { quickSort0(start, start + length, array, comp); } if ((length = d - c) > 0) { quickSort0(end - length, end, array, comp); } } public static <T> void quickSort(T[] array, int start, int end,

49 lines duplicated in:

Line 421 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 820 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
while (b <= c && (comparison = comp.compare(partionValue, array[b])) >= 0) { if (comparison == 0) { temp = array[a]; array[a++] = array[b]; array[b] = temp; } b++; } while (c >= b && (comparison = comp.compare(array[c], partionValue)) >= 0) { if (comparison == 0) { temp = array[c]; array[c] = array[d]; array[d--] = temp; } c--; } if (b > c) { break; } temp = array[b]; array[b++] = array[c]; array[c--] = temp; } length = a - start < b - a ? a - start : b - a; int l = start; int h = b - length; while (length-- > 0) { temp = array[l]; array[l++] = array[h]; array[h++] = temp; } length = d - c < end - 1 - d ? d - c : end - 1 - d; l = b; h = end - length; while (length-- > 0) { temp = array[l]; array[l++] = array[h]; array[h++] = temp; } if ((length = b - a) > 0) { quickSort0(start, start + length, array, comp); } if ((length = d - c) > 0) { quickSort0(end - length, end, array, comp); } } public static void quickSort(int[] array, int start, int end,

49 lines duplicated in:

Line 421 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 730 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
while (b <= c && (comparison = comp.compare(partionValue, array[b])) >= 0) { if (comparison == 0) { temp = array[a]; array[a++] = array[b]; array[b] = temp; } b++; } while (c >= b && (comparison = comp.compare(array[c], partionValue)) >= 0) { if (comparison == 0) { temp = array[c]; array[c] = array[d]; array[d--] = temp; } c--; } if (b > c) { break; } temp = array[b]; array[b++] = array[c]; array[c--] = temp; } length = a - start < b - a ? a - start : b - a; int l = start; int h = b - length; while (length-- > 0) { temp = array[l]; array[l++] = array[h]; array[h++] = temp; } length = d - c < end - 1 - d ? d - c : end - 1 - d; l = b; h = end - length; while (length-- > 0) { temp = array[l]; array[l++] = array[h]; array[h++] = temp; } if ((length = b - a) > 0) { quickSort0(start, start + length, array, comp); } if ((length = d - c) > 0) { quickSort0(end - length, end, array, comp); } } public static void quickSort(float[] array, int start, int end,

38 lines duplicated in:

Line 429 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1204 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
while (c >= b && (comparison = comp.compare(array[c], partionValue)) > 0) { if (comparison == 0) { temp = array[c]; array[c] = array[d]; array[d--] = temp; } c--; } if (b > c) { break; } temp = array[b]; array[b++] = array[c]; array[c--] = temp; } length = a - start < b - a ? a - start : b - a; int l = start; int h = b - length; while (length-- > 0) { temp = array[l]; array[l++] = array[h]; array[h++] = temp; } length = d - c < end - 1 - d ? d - c : end - 1 - d; l = b; h = end - length; while (length-- > 0) { temp = array[l]; array[l++] = array[h]; array[h++] = temp; } if ((length = b - a) > 0) { quickSort0(start, start + length, array, comp); } if ((length = d - c) > 0) { quickSort0(end - length, end, array, comp); } }

29 lines duplicated in:

Line 1404 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1509 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1615 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1720 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1826 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1931 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 2037 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
double rVal = in[r]; if (c.compare(fromVal, rVal) <= 0) { int l_1 = find(in, rVal, -1, start + 1, med - 1, c); int toCopy = l_1 - start + 1; System.arraycopy(in, start, out, i, toCopy); i += toCopy; out[i++] = rVal; r++; start = l_1 + 1; } else { int r_1 = find(in, fromVal, 0, r + 1, end - 1, c); int toCopy = r_1 - r + 1; System.arraycopy(in, r, out, i, toCopy); i += toCopy; out[i++] = fromVal; start++; r = r_1 + 1; } } while ((end - r) > 0 && (med - start) > 0); // copy rest of array if ((end - r) <= 0) { System.arraycopy(in, start, out, i, med - start); } else { System.arraycopy(in, r, out, i, end - r); } } private static int find(double[] arr, double val, int bnd, int l, int r,

29 lines duplicated in:

Line 1298 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1404 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
byte rVal = in[r]; if (c.compare(fromVal, rVal) <= 0) { int l_1 = find(in, rVal, -1, start + 1, med - 1, c); int toCopy = l_1 - start + 1; System.arraycopy(in, start, out, i, toCopy); i += toCopy; out[i++] = rVal; r++; start = l_1 + 1; } else { int r_1 = find(in, fromVal, 0, r + 1, end - 1, c); int toCopy = r_1 - r + 1; System.arraycopy(in, r, out, i, toCopy); i += toCopy; out[i++] = fromVal; start++; r = r_1 + 1; } } while ((end - r) > 0 && (med - start) > 0); // copy rest of array if ((end - r) <= 0) { System.arraycopy(in, start, out, i, med - start); } else { System.arraycopy(in, r, out, i, end - r); } } private static int find(byte[] arr, byte val, int bnd, int l, int r,

25 lines duplicated in:

Line 879 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 969 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1075 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1165 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
short temp; int length = end - start; if (length < 7) { for (int i = start + 1; i < end; i++) { for (int j = i; j > start && comp.compare(array[j - 1], array[j]) > 0; j--) { temp = array[j]; array[j] = array[j - 1]; array[j - 1] = temp; } } return; } int middle = (start + end) / 2; if (length > 7) { int bottom = start; int top = end - 1; if (length > 40) { length /= 8; bottom = med3(array, bottom, bottom + length, bottom + (2 * length), comp); middle = med3(array, middle - length, middle, middle + length, comp); top = med3(array, top - (2 * length), top - length, top, comp); } middle = med3(array, bottom, middle, top, comp); }

25 lines duplicated in:

Line 699 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 789 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
float temp; int length = end - start; if (length < 7) { for (int i = start + 1; i < end; i++) { for (int j = i; j > start && comp.compare(array[j], array[j - 1]) < 0; j--) { temp = array[j]; array[j] = array[j - 1]; array[j - 1] = temp; } } return; } int middle = (start + end) / 2; if (length > 7) { int bottom = start; int top = end - 1; if (length > 40) { length /= 8; bottom = med3(array, bottom, bottom + length, bottom + (2 * length), comp); middle = med3(array, middle - length, middle, middle + length, comp); top = med3(array, top - (2 * length), top - length, top, comp); } middle = med3(array, bottom, middle, top, comp); }

25 lines duplicated in:

Line 390 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 609 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 879 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
int temp; int length = end - start; if (length < 7) { for (int i = start + 1; i < end; i++) { for (int j = i; j > start && comp.compare(array[j - 1], array[j]) > 0; j--) { temp = array[j]; array[j] = array[j - 1]; array[j - 1] = temp; } } return; } int middle = (start + end) / 2; if (length > 7) { int bottom = start; int top = end - 1; if (length > 40) { length /= 8; bottom = med3(array, bottom, bottom + length, bottom + (2 * length), comp); middle = med3(array, middle - length, middle, middle + length, comp); top = med3(array, top - (2 * length), top - length, top, comp); } middle = med3(array, bottom, middle, top, comp); }

76 lines duplicated in:

Line 81 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/DanishStemmer.java
Line 80 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/NorwegianStemmer.java
super.copy_from(other); } private boolean r_mark_regions() { int v_1; int v_2; // (, line 26 I_p1 = limit; // test, line 30 v_1 = cursor; // (, line 30 // hop, line 30 { int c = cursor + 3; if (0 > c || c > limit) { return false; } cursor = c; } // setmark x, line 30 I_x = cursor; cursor = v_1; // goto, line 31 golab0: while(true) { v_2 = cursor; lab1: do { if (!(in_grouping(g_v, 97, 248))) { break lab1; } cursor = v_2; break golab0; } while (false); cursor = v_2; if (cursor >= limit) { return false; } cursor++; } // gopast, line 31 golab2: while(true) { lab3: do { if (!(out_grouping(g_v, 97, 248))) { break lab3; } break golab2; } while (false); if (cursor >= limit) { return false; } cursor++; } // setmark p1, line 31 I_p1 = cursor; // try, line 32 lab4: do { // (, line 32 if (!(I_p1 < I_x)) { break lab4; } I_p1 = I_x; } while (false); return true; } private boolean r_main_suffix() { int among_var; int v_1; int v_2;

87 lines duplicated in:

Line 731 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/ItalianStemmer.java
Line 647 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/SpanishStemmer.java
among_var = find_among_b(a_6, 46); if (among_var == 0) { return false; } // ], line 87 bra = cursor; switch(among_var) { case 0: return false; case 1: // (, line 98 // call R2, line 99 if (!r_R2()) { return false; } // delete, line 99 slice_del(); break; case 2: // (, line 104 // call R2, line 105 if (!r_R2()) { return false; } // delete, line 105 slice_del(); // try, line 106 v_1 = limit - cursor; lab0: do { // (, line 106 // [, line 106 ket = cursor; // literal, line 106 if (!(eq_s_b(2, "ic"))) { cursor = limit - v_1; break lab0; } // ], line 106 bra = cursor; // call R2, line 106 if (!r_R2()) { cursor = limit - v_1; break lab0; } // delete, line 106 slice_del(); } while (false); break; case 3: // (, line 110 // call R2, line 111 if (!r_R2()) { return false; } // <-, line 111 slice_from("log"); break; case 4: // (, line 114 // call R2, line 115 if (!r_R2()) { return false; } // <-, line 115 slice_from("u"); break; case 5: // (, line 118 // call R2, line 119 if (!r_R2()) { return false; } // <-, line 119 slice_from("ente"); break; case 6: // (, line 122 // call R1, line 123 if (!r_R1())

35 lines duplicated in:

Line 271 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/AbstractDoubleList.java
Line 271 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/AbstractIntList.java
public boolean removeAll(AbstractIntList other) { if (other.isEmpty()) { return false; } //nothing to do int limit = other.size() - 1; int j = 0; for (int i = 0; i < size; i++) { if (other.indexOfFromTo(getQuick(i), 0, limit) < 0) { setQuick(j++, getQuick(i)); } } boolean modified = (j != size); setSize(j); return modified; } @Override public void removeFromTo(int from, int to) { checkRangeFromTo(from, to, size); int numMoved = size - to - 1; if (numMoved > 0) { replaceFromToWithFrom(from, from - 1 + numMoved, this, to + 1); //fillFromToWith(from+numMoved, size-1, 0.0f); //delta } int width = to - from + 1; if (width > 0) { setSizeRaw(size - width); } } public void replaceFromToWithFrom(int from, int to, AbstractIntList other, int otherFrom) {

34 lines duplicated in:

Line 325 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/AbstractDoubleList.java
Line 324 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/AbstractIntList.java
public void replaceFromToWithFromTo(int from, int to, AbstractIntList other, int otherFrom, int otherTo) { if (otherFrom > otherTo) { throw new IndexOutOfBoundsException("otherFrom: " + otherFrom + ", otherTo: " + otherTo); } if (this == other && to - from != otherTo - otherFrom) { // avoid stumbling over my own feet replaceFromToWithFromTo(from, to, partFromTo(otherFrom, otherTo), 0, otherTo - otherFrom); return; } int length = otherTo - otherFrom + 1; int diff = length; int theLast = from - 1; if (to >= from) { diff -= (to - from + 1); theLast = to; } if (diff > 0) { beforeInsertDummies(theLast + 1, diff); } else { if (diff < 0) { removeFromTo(theLast + diff, theLast - 1); } } if (length > 0) { replaceFromToWithFrom(from, from + length - 1, other, otherFrom); } } public boolean retainAll(AbstractIntList other) {

59 lines duplicated in:

Line 309 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/NorwegianStemmer.java
Line 300 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/SwedishStemmer.java
return true; } @Override public boolean stem() { int v_1; int v_2; int v_3; int v_4; // (, line 64 // do, line 66 v_1 = cursor; lab0: do { // call mark_regions, line 66 if (!r_mark_regions()) { break lab0; } } while (false); cursor = v_1; // backwards, line 67 limit_backward = cursor; cursor = limit; // (, line 67 // do, line 68 v_2 = limit - cursor; lab1: do { // call main_suffix, line 68 if (!r_main_suffix()) { break lab1; } } while (false); cursor = limit - v_2; // do, line 69 v_3 = limit - cursor; lab2: do { // call consonant_pair, line 69 if (!r_consonant_pair()) { break lab2; } } while (false); cursor = limit - v_3; // do, line 70 v_4 = limit - cursor; lab3: do { // call other_suffix, line 70 if (!r_other_suffix()) { break lab3; } } while (false); cursor = limit - v_4; cursor = limit_backward; return true; } @Override public boolean equals( Object o ) { return o instanceof SwedishStemmer;

68 lines duplicated in:

Line 729 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/PortugueseStemmer.java
Line 779 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/SpanishStemmer.java
if (!r_R2()) { cursor = limit - v_2; break lab1; } // delete, line 126 slice_del(); break; } } while (false); break; case 7: // (, line 134 // call R2, line 135 if (!r_R2()) { return false; } // delete, line 135 slice_del(); // try, line 136 v_3 = limit - cursor; lab2: do { // (, line 136 // [, line 137 ket = cursor; // substring, line 137 among_var = find_among_b(a_4, 3); if (among_var == 0) { cursor = limit - v_3; break lab2; } // ], line 137 bra = cursor; switch(among_var) { case 0: cursor = limit - v_3; break lab2; case 1: // (, line 140 // call R2, line 140 if (!r_R2()) { cursor = limit - v_3; break lab2; } // delete, line 140 slice_del(); break; } } while (false); break; case 8: // (, line 146 // call R2, line 147 if (!r_R2()) { return false; } // delete, line 147 slice_del(); // try, line 148 v_4 = limit - cursor; lab3: do { // (, line 148 // [, line 149 ket = cursor;

26 lines duplicated in:

Line 1271 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1377 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1482 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1588 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1693 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1799 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1904 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 2010 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
double prev = out[i - 1]; if (c.compare(prev, current) > 0) { int j = i; do { out[j--] = prev; } while (j > start && (c.compare(prev = out[j - 1], current) > 0)); out[j] = current; } } return; } int med = (end + start) >>> 1; mergeSort(out, in, start, med, c); mergeSort(out, in, med, end, c); // merging // if arrays are already sorted - no merge if (c.compare(in[med - 1], in[med]) <= 0) { System.arraycopy(in, start, out, start, len); return; } int r = med, i = start; // use merging with exponential search do {

58 lines duplicated in:

Line 789 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/DutchStemmer.java
Line 640 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/GermanStemmer.java
return true; } @Override public boolean stem() { int v_1; int v_2; int v_3; int v_4; // (, line 124 // do, line 125 v_1 = cursor; lab0: do { // call prelude, line 125 if (!r_prelude()) { break lab0; } } while (false); cursor = v_1; // do, line 126 v_2 = cursor; lab1: do { // call mark_regions, line 126 if (!r_mark_regions()) { break lab1; } } while (false); cursor = v_2; // backwards, line 127 limit_backward = cursor; cursor = limit; // do, line 128 v_3 = limit - cursor; lab2: do { // call standard_suffix, line 128 if (!r_standard_suffix()) { break lab2; } } while (false); cursor = limit - v_3; cursor = limit_backward; // do, line 129 v_4 = cursor; lab3: do { // call postlude, line 129 if (!r_postlude()) { break lab3; } } while (false); cursor = v_4; return true; } @Override public boolean equals( Object o ) { return o instanceof GermanStemmer;

21 lines duplicated in:

Line 394 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 703 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
for (int j = i; j > start && comp.compare(array[j], array[j - 1]) < 0; j--) { temp = array[j]; array[j] = array[j - 1]; array[j - 1] = temp; } } return; } int middle = (start + end) / 2; if (length > 7) { int bottom = start; int top = end - 1; if (length > 40) { length /= 8; bottom = med3(array, bottom, bottom + length, bottom + (2 * length), comp); middle = med3(array, middle - length, middle, middle + length, comp); top = med3(array, top - (2 * length), top - length, top, comp); } middle = med3(array, bottom, middle, top, comp); }

63 lines duplicated in:

Line 618 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/ItalianStemmer.java
Line 569 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/RomanianStemmer.java
among_var = find_among(a_0, 3); if (among_var == 0) { break lab1; } // ], line 58 ket = cursor; switch(among_var) { case 0: break lab1; case 1: // (, line 59 // <-, line 59 slice_from("i"); break; case 2: // (, line 60 // <-, line 60 slice_from("u"); break; case 3: // (, line 61 // next, line 61 if (cursor >= limit) { break lab1; } cursor++; break; } continue replab0; } while (false); cursor = v_1; break replab0; } return true; } private boolean r_RV() { if (!(I_pV <= cursor)) { return false; } return true; } private boolean r_R1() { if (!(I_p1 <= cursor)) { return false; } return true; } private boolean r_R2() { if (!(I_p2 <= cursor)) { return false; } return true; } private boolean r_step_0() {

28 lines duplicated in:

Line 293 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/DoubleArrayList.java
Line 323 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/IntArrayList.java
IntArrayList sortedList = (IntArrayList) other.clone(); sortedList.quickSort(); for (int i = 0; i < mySize; i++) { if (sortedList.binarySearchFromTo(theElements[i], 0, limit) >= 0) { theElements[j++] = theElements[i]; } } } else { // it is faster to search in other without sorting for (int i = 0; i < mySize; i++) { if (other.indexOfFromTo(theElements[i], 0, limit) >= 0) { theElements[j++] = theElements[i]; } } } boolean modified = (j != mySize); setSize(j); return modified; } @Override public void reverse() { // overridden for performance only. int limit = size / 2; int j = size - 1;

29 lines duplicated in:

Line 358 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/AbstractDoubleList.java
Line 357 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/AbstractIntList.java
public boolean retainAll(AbstractIntList other) { if (other.isEmpty()) { if (size == 0) { return false; } setSize(0); return true; } int limit = other.size() - 1; int j = 0; for (int i = 0; i < size; i++) { if (other.indexOfFromTo(getQuick(i), 0, limit) >= 0) { setQuick(j++, getQuick(i)); } } boolean modified = (j != size); setSize(j); return modified; } @Override public void reverse() { int limit = size() / 2; int j = size() - 1; for (int i = 0; i < limit;) { //swap

25 lines duplicated in:

Line 227 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/DoubleArrayList.java
Line 257 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/IntArrayList.java
IntArrayList sortedList = (IntArrayList) other.clone(); sortedList.quickSort(); for (int i = 0; i < mySize; i++) { if (sortedList.binarySearchFromTo(theElements[i], 0, limit) < 0) { theElements[j++] = theElements[i]; } } } else { // it is faster to search in other without sorting for (int i = 0; i < mySize; i++) { if (other.indexOfFromTo(theElements[i], 0, limit) < 0) { theElements[j++] = theElements[i]; } } } boolean modified = (j != mySize); setSize(j); return modified; } @Override public void replaceFromToWithFrom(int from, int to, AbstractIntList other, int otherFrom) {

36 lines duplicated in:

Line 111 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/matrix/impl/SelectedDenseDoubleMatrix2D.java
Line 120 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/matrix/impl/SelectedSparseDoubleMatrix2D.java
} @Override protected void setUp(int rows, int columns) { super.setUp(rows, columns); this.rowStride = 1; this.columnStride = 1; this.offset = 0; } @Override protected AbstractMatrix2D vDice() { super.vDice(); // swap int[] tmp = rowOffsets; rowOffsets = columnOffsets; columnOffsets = tmp; // flips stay unaffected this.isNoView = false; return this; } @Override public DoubleMatrix1D viewColumn(int column) { checkColumn(column); int viewSize = this.rows; int viewZero = this.rowZero; int viewStride = this.rowStride; int[] viewOffsets = this.rowOffsets; int viewOffset = this.offset + columnOffset(columnRank(column)); return new SelectedSparseDoubleMatrix1D(viewSize, this.elements, viewZero, viewStride, viewOffsets, viewOffset);

42 lines duplicated in:

Line 375 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/DanishStemmer.java
Line 320 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/NorwegianStemmer.java
v_1 = cursor; lab0: do { // call mark_regions, line 74 if (!r_mark_regions()) { break lab0; } } while (false); cursor = v_1; // backwards, line 75 limit_backward = cursor; cursor = limit; // (, line 75 // do, line 76 v_2 = limit - cursor; lab1: do { // call main_suffix, line 76 if (!r_main_suffix()) { break lab1; } } while (false); cursor = limit - v_2; // do, line 77 v_3 = limit - cursor; lab2: do { // call consonant_pair, line 77 if (!r_consonant_pair()) { break lab2; } } while (false); cursor = limit - v_3; // do, line 78 v_4 = limit - cursor; lab3: do { // call other_suffix, line 78 if (!r_other_suffix()) { break lab3; } } while (false); cursor = limit - v_4;

20 lines duplicated in:

Line 305 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/AbstractDoubleList.java
Line 305 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/AbstractIntList.java
public void replaceFromToWithFrom(int from, int to, AbstractIntList other, int otherFrom) { int length = to - from + 1; if (length > 0) { checkRangeFromTo(from, to, size()); checkRangeFromTo(otherFrom, otherFrom + length - 1, other.size()); // unambiguous copy (it may hold other==this) if (from <= otherFrom) { while (--length >= 0) { setQuick(from++, other.getQuick(otherFrom++)); } } else { int otherTo = otherFrom + length - 1; while (--length >= 0) { setQuick(to--, other.getQuick(otherTo--)); } } } } public void replaceFromToWithFromTo(int from, int to, AbstractIntList other, int otherFrom, int otherTo) {

46 lines duplicated in:

Line 1366 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/FrenchStemmer.java
Line 1006 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/PortugueseStemmer.java
v_1 = cursor; lab0: do { // call prelude, line 202 if (!r_prelude()) { break lab0; } } while (false); cursor = v_1; // do, line 203 v_2 = cursor; lab1: do { // call mark_regions, line 203 if (!r_mark_regions()) { break lab1; } } while (false); cursor = v_2; // backwards, line 204 limit_backward = cursor; cursor = limit; // (, line 204 // do, line 205 v_3 = limit - cursor; lab2: do { // (, line 205 // or, line 209 lab3: do { v_4 = limit - cursor; lab4: do { // (, line 206 // and, line 207 v_5 = limit - cursor; // (, line 206 // or, line 206 lab5: do { v_6 = limit - cursor; lab6: do { // call standard_suffix, line 206 if (!r_standard_suffix()) { break lab6; } break lab5; } while (false); cursor = limit - v_6;

20 lines duplicated in:

Line 47 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/AbstractDoubleList.java
Line 47 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/AbstractIntList.java
public void beforeInsertAllOfFromTo(int index, AbstractIntList other, int from, int to) { int length = to - from + 1; this.beforeInsertDummies(index, length); this.replaceFromToWithFrom(index, index + length - 1, other, from); } @Override protected void beforeInsertDummies(int index, int length) { if (index > size || index < 0) { throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size); } if (length > 0) { ensureCapacity(size + length); setSizeRaw(size + length); replaceFromToWithFrom(index + length, size - 1, this, index); } } public int binarySearch(int key) {

13 lines duplicated in:

Line 95 of /core/carrot2-util-text/src-test/org/carrot2/text/preprocessing/TokenizerTest.java
Line 122 of /core/carrot2-util-text/src-test/org/carrot2/text/preprocessing/TokenizerTest.java
.buildContext(); assertThat(ctx).tokenAt(0) .hasImage("data").hasDocIndex(0).hasFieldIndex(0) .hasExactTokenType(ITokenizer.TT_TERM); assertThat(ctx).tokenAt(1) .hasImage("mining").hasDocIndex(0).hasFieldIndex(0) .hasExactTokenType(ITokenizer.TT_TERM); assertThat(ctx).tokenAt(2) .hasImage(null).hasDocIndex(0).hasFieldIndex(-1) .hasExactTokenType(ITokenizer.TF_SEPARATOR_FIELD); assertThat(ctx).tokenAt(3) .hasImage("web").hasDocIndex(0).hasFieldIndex(1)

26 lines duplicated in:

Line 247 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/IntArrayList.java
Line 302 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/IntArrayList.java
} /* There are two possibilities to do the thing a) use other.indexOf(...) b) sort other, then use other.binarySearch(...) Let's try to figure out which one is faster. Let M=size, N=other.size, then a) takes O(M*N) steps b) takes O(N*logN + M*logN) steps (sorting is O(N*logN) and binarySearch is O(logN)) Hence, if N*logN + M*logN < M*N, we use b) otherwise we use a). */ int limit = other.size() - 1; int j = 0; int[] theElements = elements; int mySize = size(); double N = (double) other.size(); double M = (double) mySize; if ((N + M) * org.carrot2.mahout.collections.Arithmetic.log2(N) < M * N) { // it is faster to sort other before searching in it IntArrayList sortedList = (IntArrayList) other.clone(); sortedList.quickSort(); for (int i = 0; i < mySize; i++) { if (sortedList.binarySearchFromTo(theElements[i], 0, limit) >= 0) {

26 lines duplicated in:

Line 217 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/DoubleArrayList.java
Line 272 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/list/DoubleArrayList.java
} /* There are two possibilities to do the thing a) use other.indexOf(...) b) sort other, then use other.binarySearch(...) Let's try to figure out which one is faster. Let M=size, N=other.size, then a) takes O(M*N) steps b) takes O(N*logN + M*logN) steps (sorting is O(N*logN) and binarySearch is O(logN)) Hence, if N*logN + M*logN < M*N, we use b) otherwise we use a). */ int limit = other.size() - 1; int j = 0; double[] theElements = elements; int mySize = size(); double N = (double) other.size(); double M = (double) mySize; if ((N + M) * org.carrot2.mahout.collections.Arithmetic.log2(N) < M * N) { // it is faster to sort other before searching in it DoubleArrayList sortedList = (DoubleArrayList) other.clone(); sortedList.quickSort(); for (int i = 0; i < mySize; i++) { if (sortedList.binarySearchFromTo(theElements[i], 0, limit) >= 0) {

25 lines duplicated in:

Line 1328 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1433 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1538 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1644 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1749 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1855 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 1960 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
FloatComparator c) { int m = l; int d = 1; while (m <= r) { if (c.compare(val, arr[m]) > bnd) { l = m + 1; } else { r = m - 1; break; } m += d; d <<= 1; } while (l <= r) { m = (l + r) >>> 1; if (c.compare(val, arr[m]) > bnd) { l = m + 1; } else { r = m - 1; } } return l - 1; } private static final DoubleComparator naturalDoubleComparison = new DoubleComparator() {

26 lines duplicated in:

Line 198 of /core/carrot2-util-text/src/org/carrot2/text/preprocessing/PhraseExtractor.java
Line 247 of /core/carrot2-util-text/src/org/carrot2/text/preprocessing/PhraseExtractor.java
if (currentLcp - j >= MIN_PHRASE_LENGTH) { sp++; rcsStack[sp] = new Substring(i, currentSuffixIndex, currentSuffixIndex + currentLcp - j, (j == 0 ? 2 : 1)); rcsStack[sp].tfByDocument = new IntIntHashMap(); rcsStack[sp].tfByDocument.put( documentIndexArray[suffixArray[i - 1]], 1); if (j == 0) { rcsStack[sp].tfByDocument.putOrAdd(currentDocumentIndex, 1, 1); } else { rcsStack[sp].documentIndexToOffset = documentIndexArray[suffixArray[i - 1]]; } } } i++; } else { Substring r1 = rcsStack[sp];

45 lines duplicated in:

Line 840 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/ItalianStemmer.java
Line 746 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/SpanishStemmer.java
among_var = find_among_b(a_3, 4); if (among_var == 0) { cursor = limit - v_2; break lab1; } // ], line 125 bra = cursor; // call R2, line 125 if (!r_R2()) { cursor = limit - v_2; break lab1; } // delete, line 125 slice_del(); switch(among_var) { case 0: cursor = limit - v_2; break lab1; case 1: // (, line 126 // [, line 126 ket = cursor; // literal, line 126 if (!(eq_s_b(2, "at"))) { cursor = limit - v_2; break lab1; } // ], line 126 bra = cursor; // call R2, line 126 if (!r_R2()) { cursor = limit - v_2; break lab1; } // delete, line 126 slice_del(); break; } } while (false); break; case 7:

48 lines duplicated in:

Line 526 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/FrenchStemmer.java
Line 536 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/PortugueseStemmer.java
case 3: // (, line 66 // next, line 66 if (cursor >= limit) { break lab1; } cursor++; break; } continue replab0; } while (false); cursor = v_1; break replab0; } return true; } private boolean r_RV() { if (!(I_pV <= cursor)) { return false; } return true; } private boolean r_R1() { if (!(I_p1 <= cursor)) { return false; } return true; } private boolean r_R2() { if (!(I_p2 <= cursor)) { return false; } return true; } private boolean r_standard_suffix() { int among_var; int v_1; int v_2; int v_3; int v_4;

49 lines duplicated in:

Line 638 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/ItalianStemmer.java
Line 514 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/SpanishStemmer.java
case 6: // (, line 57 // next, line 57 if (cursor >= limit) { break lab1; } cursor++; break; } continue replab0; } while (false); cursor = v_1; break replab0; } return true; } private boolean r_RV() { if (!(I_pV <= cursor)) { return false; } return true; } private boolean r_R1() { if (!(I_p1 <= cursor)) { return false; } return true; } private boolean r_R2() { if (!(I_p2 <= cursor)) { return false; } return true; } private boolean r_attached_pronoun() { int among_var; // (, line 67 // [, line 68 ket = cursor; // substring, line 68 if (find_among_b(a_1, 13) == 0)

23 lines duplicated in:

Line 1328 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 2066 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
DoubleComparator c) { int m = l; int d = 1; while (m <= r) { if (c.compare(val, arr[m]) > bnd) { l = m + 1; } else { r = m - 1; break; } m += d; d <<= 1; } while (l <= r) { m = (l + r) >>> 1; if (c.compare(val, arr[m]) > bnd) { l = m + 1; } else { r = m - 1; } } return l - 1; }

13 lines duplicated in:

Line 387 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/AbstractMatrix.java
Line 420 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/AbstractMatrix.java
public Matrix plus(Matrix other) { int rows = rowSize(); if (rows != other.rowSize()) { throw new CardinalityException(rows, other.rowSize()); } int columns = columnSize(); if (columns != other.columnSize()) { throw new CardinalityException(columns, other.columnSize()); } Matrix result = like(); for (int row = 0; row < rows; row++) { for (int col = 0; col < columns; col++) { result.setQuick(row, col, getQuick(row, col)

30 lines duplicated in:

Line 94 of /workbench/org.carrot2.workbench.editors.lucene/src/org/carrot2/workbench/editors/lucene/IndexDirectoryEditor.java
Line 92 of /workbench/org.carrot2.workbench.editors/src/org/carrot2/workbench/editors/impl/DirectoryEditor.java
dirLocation.setLayoutData(gd); } /* * */ private void createFileButton(Composite holder) { final Image image = EditorsPlugin.getImageDescriptor("icons/open_folder.png") .createImage(); disposeBin.add(image); final Button button = new Button(holder, SWT.PUSH | SWT.CENTER); button.setImage(image); button.setLayoutData(GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER) .create()); button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { openIndexDialog(); } }); } /* * */ private void createClearButton(Composite holder)

47 lines duplicated in:

Line 127 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/DanishStemmer.java
Line 133 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/SwedishStemmer.java
if (!(out_grouping(g_v, 97, 246))) { break lab3; } break golab2; } while (false); if (cursor >= limit) { return false; } cursor++; } // setmark p1, line 30 I_p1 = cursor; // try, line 31 lab4: do { // (, line 31 if (!(I_p1 < I_x)) { break lab4; } I_p1 = I_x; } while (false); return true; } private boolean r_main_suffix() { int among_var; int v_1; int v_2; // (, line 36 // setlimit, line 37 v_1 = limit - cursor; // tomark, line 37 if (cursor < I_p1) { return false; } cursor = I_p1; v_2 = limit_backward; limit_backward = cursor; cursor = limit - v_1; // (, line 37 // [, line 37 ket = cursor; // substring, line 37 among_var = find_among_b(a_0, 37);

15 lines duplicated in:

Line 987 of /core/carrot2-algorithm-stc/src/org/carrot2/clustering/stc/STCClusteringAlgorithm.java
Line 1024 of /core/carrot2-algorithm-stc/src/org/carrot2/clustering/stc/STCClusteringAlgorithm.java
final int start = words.size(); final int [] phraseIndices = p.cluster.phrases.get(0); final short [] tokenTypes = context.allWords.type; for (int i = 0; i < phraseIndices.length; i += 2) { for (int j = phraseIndices[i]; j <= phraseIndices[i + 1]; j++) { final int termIndex = sb.input.get(j); if (!TokenTypeUtils.isCommon(tokenTypes[termIndex])) { words.push(termIndex); } } }

43 lines duplicated in:

Line 284 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/RussianStemmer.java
Line 446 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/RussianStemmer.java
among_var = find_among_b(a_4, 46); if (among_var == 0) { return false; } // ], line 137 bra = cursor; switch(among_var) { case 0: return false; case 1: // (, line 143 // or, line 143 lab0: do { v_1 = limit - cursor; lab1: do { // literal, line 143 if (!(eq_s_b(1, "\u0430"))) { break lab1; } break lab0; } while (false); cursor = limit - v_1; // literal, line 143 if (!(eq_s_b(1, "\u044F"))) { return false; } } while (false); // delete, line 143 slice_del(); break; case 2: // (, line 151 // delete, line 151 slice_del(); break; } return true; } private boolean r_noun() {

20 lines duplicated in:

Line 190 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/map/AbstractIntDoubleMap.java
Line 212 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/map/AbstractIntDoubleMap.java
keysSortedByValue(theKeys); StringBuilder buf = new StringBuilder(); buf.append('['); int maxIndex = theKeys.size() - 1; for (int i = 0; i <= maxIndex; i++) { int key = theKeys.get(i); buf.append(String.valueOf(key)); buf.append("->"); buf.append(String.valueOf(get(key))); if (i < maxIndex) { buf.append(", "); } } buf.append(']'); return buf.toString(); } public DoubleArrayList values() {

29 lines duplicated in:

Line 115 of /workbench/org.carrot2.workbench.editors/src/org/carrot2/workbench/editors/impl/DirectoryEditor.java
Line 145 of /workbench/org.carrot2.workbench.editors/src/org/carrot2/workbench/editors/impl/ResourceEditor.java
resourceInfo.setLayoutData(gd); } /* * */ private void createClearButton(Composite holder) { final Image image = EditorsPlugin.getImageDescriptor("icons/clear.png").createImage(); disposeBin.add(image); final Button button = new Button(holder, SWT.PUSH | SWT.CENTER); button.setImage(image); button.setLayoutData(GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER) .create()); button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { setValue(null); } }); } /* * */ private void createFileButton(Composite holder)

25 lines duplicated in:

Line 62 of /applications/carrot2-examples/examples/org/carrot2/examples/clustering/UsingCustomLanguageModel.java
Line 60 of /applications/carrot2-examples/examples/org/carrot2/examples/clustering/UsingCustomLexicalResources.java
.resourceLookup(resourceLookup); controller.init(attrs); // Cluster some data with Lingo and STC. clusterAndDisplayClusters(controller, LingoClusteringAlgorithm.class); clusterAndDisplayClusters(controller, STCClusteringAlgorithm.class); } /** * Clusters results for query "data mining" and displays the clusters. */ private static void clusterAndDisplayClusters(final Controller controller, final Class<? extends IClusteringAlgorithm> clusteringAlgorithm) { final Map<String, Object> processingAttributes = Maps.newHashMap(); CommonAttributesDescriptor.attributeBuilder(processingAttributes) .documents(Lists.newArrayList(SampleDocumentData.DOCUMENTS_DATA_MINING)) .query("data mining"); final ProcessingResult result = controller.process(processingAttributes, clusteringAlgorithm); ConsoleFormatter.displayClusters(result.getClusters(), 0); }

14 lines duplicated in:

Line 38 of /core/carrot2-util-text/src-test/org/carrot2/text/preprocessing/StemmerEnglishTest.java
Line 54 of /core/carrot2-util-text/src-test/org/carrot2/text/preprocessing/StemmerEnglishTest.java
.newDoc("DATA MINING", "DATA MINING") .buildContextAssert(); a.constainsStem("data").withTf(2).withDocumentTf(0, 2).withFieldIndices(0, 1); a.constainsStem("mine").withTf(2).withDocumentTf(0, 2).withFieldIndices(0, 1); assertThat(a.context.allStems.image.length).isEqualTo(2); assertThat(a.tokens()).onProperty("stemImage") .containsExactly("data", "mine", null, "data", "mine", null); } @Test public void testMixedCaseWords()

45 lines duplicated in:

Line 587 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/ItalianStemmer.java
Line 485 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/PortugueseStemmer.java
if (!(out_grouping(g_v, 97, 250))) { break lab21; } break golab20; } while (false); if (cursor >= limit) { break lab13; } cursor++; } // setmark p2, line 58 I_p2 = cursor; } while (false); cursor = v_8; return true; } private boolean r_postlude() { int among_var; int v_1; // repeat, line 62 replab0: while(true) { v_1 = cursor; lab1: do { // (, line 62 // [, line 63 bra = cursor; // substring, line 63 among_var = find_among(a_1, 3); if (among_var == 0) { break lab1; } // ], line 63 ket = cursor; switch(among_var) { case 0: break lab1; case 1: // (, line 64 // <-, line 64 slice_from("\u00E3");

20 lines duplicated in:

Line 37 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 58 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 120 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
public static int binarySearchFromTo(int[] array, int value, int from, int to) { int mid = -1; while (from <= to) { mid = (from + to) >>> 1; if (value > array[mid]) { from = mid + 1; } else if (value == array[mid]) { return mid; } else { to = mid - 1; } } if (mid < 0) { return -1; } return -mid - (value < array[mid] ? 1 : 2); } public static int binarySearchFromTo(long[] array, long value, int from, int to) {

45 lines duplicated in:

Line 636 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/ItalianStemmer.java
Line 534 of /core/carrot2-util-text/src/org/carrot2/text/linguistic/snowball/stemmers/PortugueseStemmer.java
slice_from("\u00F5"); break; case 3: // (, line 66 // next, line 66 if (cursor >= limit) { break lab1; } cursor++; break; } continue replab0; } while (false); cursor = v_1; break replab0; } return true; } private boolean r_RV() { if (!(I_pV <= cursor)) { return false; } return true; } private boolean r_R1() { if (!(I_p1 <= cursor)) { return false; } return true; } private boolean r_R2() { if (!(I_p2 <= cursor)) { return false; } return true; } private boolean r_standard_suffix() {

30 lines duplicated in:

Line 94 of /core/carrot2-util-matrix/src/org/carrot2/matrix/factorization/LocalNonnegativeMatrixFactorization.java
Line 94 of /core/carrot2-util-matrix/src/org/carrot2/matrix/factorization/NonnegativeMatrixFactorizationKL.java
V.assign(VT, Functions.MULT); // V <- V .* VT // Update U U.zMult(V, UV, 1, 0, false, true); // UV <- U*V' UV.assign(plusEps); // UV <- UV + eps UV.assign(Aeps, invDiv); // UV <- Aeps ./ UV UV.zMult(V, UT, 1, 0, false, false); // UT <- UV * V U.assign(UT, Functions.MULT); // U <- U .* UT MatrixUtils.normalizeColumnL1(U, work); iterationsCompleted++; if (stopThreshold >= 0) { if (updateApproximationError()) { break; } } } if (ordered) { order(); } } public String toString() { return "NMF-KL-" + seedingStrategy.toString();

20 lines duplicated in:

Line 37 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 139 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
public static int binarySearchFromTo(long[] array, long value, int from, int to) { int mid = -1; while (from <= to) { mid = (from + to) >>> 1; if (value > array[mid]) { from = mid + 1; } else if (value == array[mid]) { return mid; } else { to = mid - 1; } } if (mid < 0) { return -1; } return -mid - (value < array[mid] ? 1 : 2); } public static <T extends Comparable<T>> int binarySearchFromTo(T[] array,

12 lines duplicated in:

Line 22 of /core/carrot2-util-text/src/org/carrot2/text/preprocessing/filter/LeftCompleteLabelFilter.java
Line 22 of /core/carrot2-util-text/src/org/carrot2/text/preprocessing/filter/RightCompleteLabelFilter.java
class RightCompleteLabelFilter extends CompleteLabelFilterBase { int [] createLcp(List<LabelIndexWithCodes> phraseCodes) { int [] lcpArray = new int [phraseCodes.size()]; for (int i = 0; i < phraseCodes.size() - 1; i++) { int [] codes = phraseCodes.get(i).getCodes(); int [] nextCodes = phraseCodes.get(i + 1).getCodes(); int minLength = Math.min(codes.length, nextCodes.length); for (int j = 0; j < minLength; j++)

11 lines duplicated in:

Line 312 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
Line 322 of /core/carrot2-util-matrix/src/org/carrot2/mahout/math/Sorting.java
int x = array[a], y = array[b], z = array[c]; int comparisonxy = comp.compare(x, y); int comparisonxz = comp.compare(x, z); int comparisonyz = comp.compare(y, z); return comparisonxy < 0 ? (comparisonyz < 0 ? b : (comparisonxz < 0 ? c : a)) : (comparisonyz > 0 ? b : (comparisonxz > 0 ? c : a)); } private static int med3(int a, int b, int c, IntComparator comp) {