carrot2-cvscommits Mailing List for Carrot2 (Page 399)
Brought to you by:
dawidweiss,
stachoo
This list is closed, nobody may subscribe to it.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(26) |
Nov
(58) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(16) |
Feb
(176) |
Mar
(2) |
Apr
(23) |
May
(854) |
Jun
(650) |
Jul
(248) |
Aug
(104) |
Sep
(58) |
Oct
(24) |
Nov
|
Dec
(27) |
2005 |
Jan
|
Feb
(186) |
Mar
(127) |
Apr
(54) |
May
(8) |
Jun
(103) |
Jul
(38) |
Aug
(75) |
Sep
(92) |
Oct
(110) |
Nov
(42) |
Dec
(146) |
2006 |
Jan
(733) |
Feb
(80) |
Mar
(23) |
Apr
(41) |
May
(31) |
Jun
(89) |
Jul
(137) |
Aug
(93) |
Sep
(96) |
Oct
(31) |
Nov
(36) |
Dec
(25) |
2007 |
Jan
(58) |
Feb
(25) |
Mar
(29) |
Apr
(68) |
May
(55) |
Jun
(43) |
Jul
(54) |
Aug
(104) |
Sep
(10) |
Oct
(24) |
Nov
(41) |
Dec
(32) |
2008 |
Jan
(80) |
Feb
(81) |
Mar
(141) |
Apr
(141) |
May
(94) |
Jun
(63) |
Jul
(141) |
Aug
(87) |
Sep
(66) |
Oct
(84) |
Nov
(110) |
Dec
(58) |
2009 |
Jan
(21) |
Feb
(56) |
Mar
(53) |
Apr
(67) |
May
(95) |
Jun
(10) |
Jul
(93) |
Aug
(41) |
Sep
(62) |
Oct
(54) |
Nov
(39) |
Dec
(40) |
2010 |
Jan
(81) |
Feb
(154) |
Mar
(123) |
Apr
(56) |
May
(38) |
Jun
(28) |
Jul
(53) |
Aug
(78) |
Sep
(64) |
Oct
(90) |
Nov
(12) |
Dec
(23) |
2011 |
Jan
(88) |
Feb
(24) |
Mar
(111) |
Apr
(59) |
May
(15) |
Jun
(8) |
Jul
(63) |
Aug
(37) |
Sep
(90) |
Oct
(7) |
Nov
(48) |
Dec
(39) |
2012 |
Jan
(7) |
Feb
(2) |
Mar
(16) |
Apr
(7) |
May
(35) |
Jun
(58) |
Jul
(17) |
Aug
(61) |
Sep
(18) |
Oct
(4) |
Nov
(25) |
Dec
(8) |
2013 |
Jan
(8) |
Feb
|
Mar
(13) |
Apr
(43) |
May
(26) |
Jun
(11) |
Jul
(16) |
Aug
(5) |
Sep
|
Oct
(43) |
Nov
(6) |
Dec
(10) |
2014 |
Jan
(22) |
Feb
(35) |
Mar
(5) |
Apr
(16) |
May
(8) |
Jun
(5) |
Jul
(12) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(24) |
Dec
|
2015 |
Jan
(2) |
Feb
(31) |
Mar
(15) |
Apr
(3) |
May
(32) |
Jun
|
Jul
(11) |
Aug
(15) |
Sep
(5) |
Oct
(27) |
Nov
(3) |
Dec
|
2016 |
Jan
|
Feb
(16) |
Mar
(3) |
Apr
|
May
(7) |
Jun
|
Jul
(7) |
Aug
(29) |
Sep
(10) |
Oct
(8) |
Nov
(12) |
Dec
|
2017 |
Jan
|
Feb
(4) |
Mar
(6) |
Apr
(3) |
May
(1) |
Jun
|
Jul
(10) |
Aug
(1) |
Sep
(4) |
Oct
|
Nov
(3) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
(13) |
Feb
(43) |
Mar
(31) |
Apr
(32) |
May
(30) |
Jun
(13) |
Jul
(6) |
Aug
(30) |
Sep
(43) |
Oct
(43) |
Nov
(28) |
Dec
(26) |
2020 |
Jan
(19) |
Feb
(16) |
Mar
(4) |
Apr
(5) |
May
(15) |
Jun
(14) |
Jul
(22) |
Aug
(1) |
Sep
(12) |
Oct
(16) |
Nov
(50) |
Dec
(79) |
2021 |
Jan
(52) |
Feb
(5) |
Mar
(50) |
Apr
(8) |
May
(4) |
Jun
(20) |
Jul
(15) |
Aug
(25) |
Sep
(3) |
Oct
|
Nov
(15) |
Dec
(19) |
2022 |
Jan
(8) |
Feb
(1) |
Mar
|
Apr
|
May
(10) |
Jun
(2) |
Jul
(9) |
Aug
(15) |
Sep
(1) |
Oct
(6) |
Nov
(12) |
Dec
(2) |
2023 |
Jan
(4) |
Feb
(2) |
Mar
(2) |
Apr
|
May
(22) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
(12) |
Nov
(24) |
Dec
|
From: <daw...@us...> - 2004-02-08 20:45:47
|
Update of /cvsroot/carrot2/carrot2/components/inputs/treeSnippetMiner/src/com/paulodev/carrot/treeExtractor/extractors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7534/src/com/paulodev/carrot/treeExtractor/extractors Modified Files: TreeExtractor.java Log Message: Small refactorings (eclipse) Index: TreeExtractor.java =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/inputs/treeSnippetMiner/src/com/paulodev/carrot/treeExtractor/extractors/TreeExtractor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TreeExtractor.java 25 Sep 2003 22:13:33 -0000 1.1 --- TreeExtractor.java 8 Feb 2004 20:42:35 -0000 1.2 *************** *** 14,17 **** --- 14,19 ---- import org.jdom.*; import org.put.util.xml.*; + + import com.paulodev.carrot.treeExtractor.extractors.SearchItem.SearchItemOccurence; import com.paulodev.carrot.util.html.parser.*; import java.net.*; *************** *** 290,294 **** BuilderHelper bh = (BuilderHelper)items.get(oc. getSearchItem().getName()); ! if (oc.getKind() == oc.KIND_ATTRIBUTE) { bh.value = bh.value + --- 292,296 ---- BuilderHelper bh = (BuilderHelper)items.get(oc. getSearchItem().getName()); ! if (oc.getKind() == SearchItemOccurence.KIND_ATTRIBUTE) { bh.value = bh.value + *************** *** 296,310 **** toLowerCase()); } ! else if (oc.getKind() == oc.KIND_BEGINAFTER) { bh.started = akt.matchNode; bh.after = true; } ! else if (oc.getKind() == oc.KIND_BEGINON) { bh.started = akt.matchNode; bh.after = false; } ! else if (oc.getKind() == oc.KIND_ENDBEFORE && bh.started != null) { StringBuffer sb = new StringBuffer(); --- 298,312 ---- toLowerCase()); } ! else if (oc.getKind() == SearchItemOccurence.KIND_BEGINAFTER) { bh.started = akt.matchNode; bh.after = true; } ! else if (oc.getKind() == SearchItemOccurence.KIND_BEGINON) { bh.started = akt.matchNode; bh.after = false; } ! else if (oc.getKind() == SearchItemOccurence.KIND_ENDBEFORE && bh.started != null) { StringBuffer sb = new StringBuffer(); *************** *** 316,320 **** bh.after = true; } ! else if (oc.getKind() == oc.KIND_INSIDE) { akt.matchNode.hide(); --- 318,322 ---- bh.after = true; } ! else if (oc.getKind() == SearchItemOccurence.KIND_INSIDE) { akt.matchNode.hide(); |
From: <daw...@us...> - 2004-02-08 20:45:47
|
Update of /cvsroot/carrot2/carrot2/components/inputs/treeSnippetMiner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7534 Added Files: .classpath .project Log Message: Small refactorings (eclipse) --- NEW FILE: .classpath --- <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="var" path="CARROT2_CVS/lib/commons-beanutils.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/commons-collections.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/commons-logging.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/log4j-1.2.7.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/put-utils.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/jdom.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/compile-time-only/servlet.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/castor-0.9.4.2-xml.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/colt.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/dweiss-utils.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/gnu-regexp-1.1.4.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/saxon.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/struts.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/xercesImpl.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/xml-apis.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/carrot2-shared-lib.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/compile-time-only/junit.jar"/> <classpathentry kind="output" path="tmp/build/WEB-INF/classes"/> </classpath> --- NEW FILE: .project --- <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>Carrot2 Tree Snippet Miner</name> <comment>Carrot2 Tree Snippet Miner</comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription> |
From: <daw...@us...> - 2004-02-08 20:40:20
|
Update of /cvsroot/carrot2/carrot2/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5629 Modified Files: carrot2-shared-lib.jar lametyzator.jar Removed Files: carrot2-adapters.jar Log Message: no message Index: carrot2-shared-lib.jar =================================================================== RCS file: /cvsroot/carrot2/carrot2/lib/carrot2-shared-lib.jar,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Binary files /tmp/cvsa0DUl0 and /tmp/cvsxfJg6C differ Index: lametyzator.jar =================================================================== RCS file: /cvsroot/carrot2/carrot2/lib/lametyzator.jar,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsrvVa44 and /tmp/cvslrPS3H differ --- carrot2-adapters.jar DELETED --- |
From: <daw...@us...> - 2004-02-08 20:38:20
|
Update of /cvsroot/carrot2/carrot2/components/inputs/adapter-nutch/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5184/doc Modified Files: installation.txt Log Message: documentation updated. Index: installation.txt =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/inputs/adapter-nutch/doc/installation.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** installation.txt 4 Feb 2004 20:32:14 -0000 1.1 --- installation.txt 8 Feb 2004 20:35:14 -0000 1.2 *************** *** 10,13 **** --- 10,19 ---- carrot2-adapter-nutch.jar + Also, include the JARs that 'show.dependencies' target in the build file + indicates. These JARs can also be collected in the distribution directory by + typing: + + ant collect.dependencies + 3. Copy the adapter JAR to Nutch's deployment folder substituting "DEPLOYED- NUTCH-DIR" a path that matches your local configuration. |
From: <daw...@us...> - 2004-02-08 20:36:34
|
Update of /cvsroot/carrot2/carrot2/components/carrot2-shared-lib/src/com/dawidweiss/carrot/adapters/localfilter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4513 Modified Files: RemoteToLocalAdapter.java Log Message: Only valid XML characters are now emitted. Index: RemoteToLocalAdapter.java =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/carrot2-shared-lib/src/com/dawidweiss/carrot/adapters/localfilter/RemoteToLocalAdapter.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** RemoteToLocalAdapter.java 19 Sep 2003 10:14:53 -0000 1.1.1.1 --- RemoteToLocalAdapter.java 8 Feb 2004 20:33:28 -0000 1.2 *************** *** 23,26 **** --- 23,29 ---- import org.put.util.net.http.HTTPFormSubmitter; import org.put.util.net.http.Parameter; + + import com.dawidweiss.carrot.util.XMLSerializerHelper; + import java.io.IOException; import java.io.InputStream; *************** *** 83,86 **** --- 86,90 ---- int id = 0; ArrayList hitsArray = new ArrayList(); + XMLSerializerHelper xmlSerializer = XMLSerializerHelper.getInstance(); while (hits.hasNext()) *************** *** 96,100 **** { requestXml.append("<title>"); ! requestXml.append(org.put.util.xml.XMLHelper.escapeElementEntities(title)); requestXml.append("</title>"); } --- 100,104 ---- { requestXml.append("<title>"); ! requestXml.append(xmlSerializer.toValidXmlText(title, false)); requestXml.append("</title>"); } *************** *** 108,112 **** requestXml.append("<url>"); ! requestXml.append(org.put.util.xml.XMLHelper.escapeElementEntities(url)); requestXml.append("</url>"); --- 112,116 ---- requestXml.append("<url>"); ! requestXml.append(xmlSerializer.toValidXmlText(url, false)); requestXml.append("</url>"); *************** *** 116,120 **** { requestXml.append("<snippet>"); ! requestXml.append(org.put.util.xml.XMLHelper.escapeElementEntities(snippet)); requestXml.append("</snippet>"); } --- 120,124 ---- { requestXml.append("<snippet>"); ! requestXml.append(xmlSerializer.toValidXmlText(snippet, false)); requestXml.append("</snippet>"); } |
From: <daw...@us...> - 2004-02-08 11:04:52
|
Update of /cvsroot/carrot2/carrot2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11028 Modified Files: history.xml Log Message: added egothor adapter Index: history.xml =================================================================== RCS file: /cvsroot/carrot2/carrot2/history.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** history.xml 6 Feb 2004 18:16:14 -0000 1.11 --- history.xml 8 Feb 2004 11:01:50 -0000 1.12 *************** *** 9,12 **** --- 9,22 ---- <history> <changelist> + <date>2004-02-08</date> + <committer>dawid</committer> + + <change component="global" type="new"> + Added an Egothor Search Engine input component adapter. + The code has been moved from the Egothor project. + </change> + </changelist> + + <changelist> <date>2004-02-06</date> <committer>dawid</committer> |
From: <daw...@us...> - 2004-02-08 11:03:13
|
Update of /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/src/com/dawidweiss/carrot/input/egothor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10750/src/com/dawidweiss/carrot/input/egothor Added Files: EgothorToCarrot2Servlet.java Log Message: egothor adapter added --- NEW FILE: EgothorToCarrot2Servlet.java --- /* * Carrot2 Project * Copyright (C) 2002-2003, Dawid Weiss * Portions (C) Contributors listen in carrot2.CONTRIBUTORS file. * All rights reserved. * * Refer to full text of the licence "carrot2.LICENCE" in the root folder * of CVS checkout or at: * http://www.cs.put.poznan.pl/dweiss/carrot2.LICENCE */ package com.dawidweiss.carrot.input.egothor; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; import java.io.Writer; import java.util.Enumeration; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.egothor.data.Hit; import org.egothor.data.QueryResponse; import org.egothor.indexer.html2.HTMLMetadata; import org.egothor.util.Snippy; import org.egothor.warrior.Normalizator; import org.egothor.web.contexts.ContextManager; import org.egothor.web.contexts.SearchContext; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * A servlet that can execute queries in Carrot2 input query XML format * against one of the predefined search contexts. The results are returned * as an XML stream in Carrot2 search results format (that can be * processed using other Carrot2-compatible components). You can use the * following POST parameters to customize the behavior of this class: * <ul> * <li> <code>search-context</code> - the name of a search context to * use. If not present, default search context is used.</li> * </ul> * More info about Carrot2: <a href="http://www.cs.put.poznan.pl/dweiss/carrot"> * http://www.cs.put.poznan.pl/dweiss/carrot</a> . * * @author Dawid Weiss */ public class EgothorToCarrot2Servlet extends HttpServlet { private final static int DEFAULT_REQUESTED_RESULTS = 100; private DocumentBuilder builder; private DocumentBuilderFactory factory; /** * Window size for snippet generator. Override this with 'window-size' * init parameter of the servlet. */ private int windowSize = 7; /** * How many context pieces should be printed? Override this with * 'max-context-sentences' init parameter of the servlet. */ private int maxContextSentences = 3; /** * How many results should be returned in case no request is * specified? */ private int defaultResultsNumber = DEFAULT_REQUESTED_RESULTS; /** * Returns true if the <code>string</code> parameter contains * characters other than matching a regular expression <code>\ \n\t\r</code> * and is not null. * * @param string Description of the Parameter * @return Description of the Return Value */ private final boolean containsNonSpaceChars(String string) { if (string == null) { return false; } int len = string.length(); // in pessimistic case we have to traverse all chars, but such case // will be very rare and we avoid creating new objects, which is a // big gain. for (int i = 0; i < len; i++) { switch (string.charAt(i)) { case ' ': case '\t': case '\n': case '\r': continue; default: return true; } } return false; } /** * Removes markup from a word. * * @param word Description of the Parameter * @return Description of the Return Value */ private final String removeMarkup(String word) { final char[] chars = word.toCharArray(); int i = 0; int j = 0; while (i < chars.length) { if (chars[i] == '<') { // skip until '>' while (i < chars.length && chars[i] != '>') { i++; } if (i < chars.length) { i++; } continue; } chars[j] = chars[i]; i++; j++; } if (i == j) { return word; } else { return new String(chars, 0, j); } } /** * Initialize the servlet. * * @param config Description of the Parameter * @exception ServletException Description of the Exception */ public void init(ServletConfig config) throws ServletException { super.init(config); try { this.maxContextSentences = Integer.parseInt( config.getInitParameter("max-context-sentences")); } catch (Exception e) { // don't care if we can't parse it or find it. } try { this.windowSize = Integer.parseInt( config.getInitParameter("window-size")); } catch (Exception e) { // don't care if we can't parse it or find it. } try { this.defaultResultsNumber = Integer.parseInt( config.getInitParameter("default-results-number")); } catch (Exception e) { // don't care if we can't parse it or find it. } factory = DocumentBuilderFactory.newInstance(); try { builder = factory.newDocumentBuilder(); } catch (ParserConfigurationException e) { throw new ServletException("Could not load an XML parser.", e); } } /** * We ignore GET requests by default. Just print some info about the * component. * * @param request Description of the Parameter * @param response Description of the Parameter * @exception ServletException Description of the Exception * @exception IOException Description of the Exception */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE, "Use HTTP POST method to send Carrot2 queries."); } /** * Process HTTP POST request assuming it contains Carrot2 query XML. * * @param request Description of the Parameter * @param response Description of the Parameter * @exception ServletException Description of the Exception * @exception IOException Description of the Exception */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // first check if we have a context manager servlet instance ContextManager contextManagerOb = null; try { contextManagerOb = (ContextManager) super.getServletContext() .getAttribute("contextManagerInstance"); if (contextManagerOb == null || false == (contextManagerOb instanceof org.egothor.web.contexts.ContextManager)) { response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Context manager instance unavailable."); return; } } catch (ClassCastException ce) { response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Context manager not an instance of org.egothor.web.contexts.ContextManager."); return; } // force input encoding if not specified. if (request.getCharacterEncoding() == null) { request.setCharacterEncoding("UTF-8"); } // now check that the request is a valid Carrot2 data. String c2data = request.getParameter("carrot-request"); if (c2data == null) { response.sendError(HttpServletResponse.SC_BAD_REQUEST, "POST request must contain 'carrot-request' parameter."); return; } Document queryRequest = null; // TODO: this is synchronized on a single object because builders // are not fail-safe. Maybe a pool would be more efficient.. on the // other hand... the gain may be insignificant. synchronized (builder) { try { queryRequest = builder.parse( new ByteArrayInputStream(c2data.getBytes("UTF-8"))); } catch (UnsupportedEncodingException e) { throw new ServletException("Fatal: UTF-8 not supported on the server JRE."); } catch (Exception e) { response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Could not read or parse Carrot2 query request."); return; } } Element queryElement = queryRequest.getDocumentElement(); if (!"query".equals(queryElement.getNodeName())) { response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Bad query XML: root element not a 'query': " + queryElement.getNodeName()); return; } ; int requestedResults = DEFAULT_REQUESTED_RESULTS; try { requestedResults = Integer.parseInt( queryElement.getAttribute("requested-results")); } catch (NumberFormatException e) { // ignore exceptions. } queryElement.normalize(); NodeList textNodes = queryElement.getChildNodes(); if (textNodes.getLength() <= 0) { response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Bad query XML: no text in 'query' element?"); return; } if (org.w3c.dom.Node.TEXT_NODE != textNodes.item(0).getNodeType()) { response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Bad query XML: 'query' should have no subelements."); return; } String query = textNodes.item(0).getNodeValue(); // now check that there is a search context available... String useSearchContext = request.getParameter("search-context"); SearchContext searchContext = null; if (useSearchContext != null) { searchContext = contextManagerOb.getSearchContext(useSearchContext); } if (searchContext == null) { searchContext = contextManagerOb.getDefaultSearchContext(); } log("Accepted Carrot2 query (requested results: " + requestedResults + ", context: " + searchContext.getName() + "): " + query); // Pass the query to Egothor's search context... if (searchContext == null || !searchContext.isConfigured()) { log("Search context not configured or usable: " + searchContext.getId()); response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Search context not configured or usable: " + searchContext.getId()); return; } // and flush the result as Carrot2 output stream. response.setContentType("text/xml"); OutputStream os = response.getOutputStream(); Writer out = new OutputStreamWriter(os, "UTF-8"); out.write("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"); out.write("<searchresult>\n"); out.write("<query requested-results=\"" + requestedResults + "\">"); Normalizator.print(out, query); out.write("</query>\n\n"); try { String queryExtension = searchContext.getQueryExtensionForRequest(request.getParameterMap()); QueryResponse qr = searchContext.executeQuery(0, requestedResults, query, queryExtension, 0); Enumeration hits = qr.getEnumeration(); String[] tokens = qr.queryTokens(); for (int i = 0; i < tokens.length; i++) { tokens[i] = removeMarkup(tokens[i]); } Snippy snipp = new Snippy(tokens) { public String snip(String text, String delim, int window, int max_hits) { return removeMarkup(super.snip(removeMarkup(text), delim, windowSize, maxContextSentences)); } }; for (int i = 0; i < requestedResults && hits.hasMoreElements(); i++) { Hit hs = (Hit) hits.nextElement(); HTMLMetadata metaData = new HTMLMetadata(hs.getMeta()); // only consider these hits that accompanied by some metadata if (metaData != null) { out.write("<document id=\"" + (i + 1) + "\">\n"); String tmp = metaData.getTitle(); out.write("<title>"); if (containsNonSpaceChars(tmp)) { Normalizator.print(out, tmp); } else { Normalizator.print(out, metaData.getLocation()); } out.write("</title>\n"); tmp = metaData.getLocation(); out.write("<url><![CDATA["); // we hope here the url won't contain ']]>' sequence. out.write(tmp); out.write("]]></url>\n"); tmp = metaData.getContent(snipp, 7); if (containsNonSpaceChars(tmp)) { out.write("<snippet>"); Normalizator.print(out, tmp); out.write("</snippet>\n"); } out.write("</document>\n\n"); } } out.write("</searchresult>\n"); out.flush(); } catch (Exception processingException) { log("Processing exception.", processingException); response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Processing exception: " + processingException.toString()); return; } } } |
From: <daw...@us...> - 2004-02-08 11:03:13
|
Update of /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10750/doc Added Files: installation.txt readme.txt Log Message: egothor adapter added --- NEW FILE: installation.txt --- 1. Download and deploy an Egothor WebApp installation from www.egothor.org. Once you're able to access Egothor via your favorite Web browser, you're set to add a Carrot2 adapter. Refer to Egothor's manual for configuring search contexts. 2. Build the adapter, you should find a JAR file in tmp/dist directory: carrot2-adapter-egothor.jar 3. Copy the adapter JAR to Egothor's WebApp deployment folder substituting "DEPLOYED-EGOTHOR-DIR" a path that matches your local configuration. ${DEPLOYED-EGOTHOR-DIR}/WEB-INF/lib Also, include the JARs that 'show.dependencies' target in the build file indicates. These JARs can also be collected in the distribution directory by typing: ant collect.dependencies 4. Add and configure Carrot2 adapter servlet by adding the following section to Egothor's web application deployment file (${DEPLOYED-EGOTHOR-DIR}/WEB-INF/web.xml): <!-- Carrot2 Input Component Servlet --> <servlet> <servlet-name> Egothor To Carrot2 Input Component </servlet-name> <servlet-class> com.dawidweiss.carrot.input.egothor.EgothorToCarrot2Servlet </servlet-class> <!-- these control how big snippets will be output by default --> <init-param> <param-name>max-context-sentences</param-name> <param-value>3</param-value> </init-param> <init-param> <param-name>window-size</param-name> <param-value>7</param-value> </init-param> <!-- this controls how big the default result is --> <init-param> <param-name>default-results-number</param-name> <param-value>100</param-value> </init-param> <!-- Do not remove this configuration element. --> <load-on-startup>1</load-on-startup> </servlet> <!-- EOF: Carrot2 Input Component Servlet --> Finally, add servlet's mapping to some URL. For example: <!-- Servlet mappings --> <servlet-mapping> <servlet-name>Egothor To Carrot2 Input Component</servlet-name> <url-pattern>/e2c</url-pattern> </servlet-mapping> NOTE: The web.xml file has a strictly defined order of defined elements (in a DTD file). If uncertain, use a validating XML editor like JEdit (www.jedit.org). 5. One Egothor instance can expose more than one search context. Selection of a search context via the adapter can be made by passing a named HTTP POST argument to it before the query: search-context=<search context to use> --- NEW FILE: readme.txt --- This is an adapter to Egothor search engine that exposes a Carrot2 Input Component URL from an instance of Egothor WebApp. Egothor can be downloaded from: http://www.egothor.org |
From: <daw...@us...> - 2004-02-08 11:03:12
|
Update of /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10750 Added Files: .classpath .cvsignore .project adapter-egothor.dep.xml build.xml Log Message: egothor adapter added --- NEW FILE: .classpath --- <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="var" path="CARROT2_CVS/lib/compile-time-only/servlet.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/carrot2-shared-lib.jar"/> <classpathentry kind="output" path="tmp/build/"/> </classpath> --- NEW FILE: .cvsignore --- tmp local.properties --- NEW FILE: .project --- <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>Carrot2 Egothor Adapter</name> <comment>Egothor Adapter -- Input Component for Carrot2</comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription> --- NEW FILE: adapter-egothor.dep.xml --- <!-- A dependency descriptor. This has to be updated manually when new JARs are required. --> <component name="adapter-egothor"> <dependency name="carrot2-shared-lib-only" /> </component> --- NEW FILE: build.xml --- <?xml version="1.0" encoding="UTF-8" ?> <project name="Egothor Input Component Adapter for Carrot2" default="help" basedir="." > <!-- ## place your local properties (egothor.dir) here --> <property file="local.properties" /> <!-- ## these are overrioden by master build file ### --> <property name="distribution.dir" location="tmp/dist" /> <property name="javadoc.dir" location="tmp/javadoc" /> <property name="carrot2.cvs.dir" location="../../.." /> <!-- ## global properties ### --> <property name="build.dir" location="tmp/build" /> <property name="build.compiler" value="modern" /> <property name="dist.name" value="carrot2-adapter-egothor" /> <!-- ## local properties ### --> <property name="src.path" location="src" /> <property name="javac.optimize" value="off" /> <property name="javac.debug" value="on" /> <!-- ##################################### --> <!-- ### {{{ CLEAN ### --> <!-- ##################################### --> <target name="clean" description="Removes compiled classes and distribution files."> <delete failonerror="false" includeemptydirs="true" quiet="true"> <fileset dir="tmp" /> </delete> </target> <!-- }}} --> <!-- ##################################### --> <!-- ### {{{ PREPARE ### --> <!-- ##################################### --> <target name="check-egothor-available"> <condition property="cond:egothor.available" value="true"> <and> <available file="${egothor.dir}" type="dir" /> <available classname="org.egothor.query.Executor"> <classpath> <fileset dir="${egothor.dir}" includes="WEB-INF/lib/*.jar" /> </classpath> </available> </and> </condition> </target> <target name="prepare" depends="check-egothor-available, generate.dependency.path" if="cond:egothor.available"> <mkdir dir="${distribution.dir}" /> <mkdir dir="${build.dir}" /> </target> <!-- }}} --> <!-- ##################################### --> <!-- ### {{{ DEPENDENCY analysis ### --> <!-- ##################################### --> <property name="component.descriptor" location="adapter-egothor.dep.xml" /> <target name="define.dependency.task"> <taskdef resource="com/dawidweiss/carrot/ant/dependencies.antlib.xml"> <classpath location="${carrot2.cvs.dir}/lib/carrot2-shared-lib.jar" /> </taskdef> </target> <target name="generate.dependency.path" depends="define.dependency.task"> <dependencylist property="component.dep" fileListId="component.dep.flist" componentDescriptor="${component.descriptor}" verbose="false" > <dependencies dir="${carrot2.cvs.dir}/lib"> <include name="*.dep.xml" /> </dependencies> </dependencylist> <path id="classpath.dependencies"> <filelist refid="component.dep.flist" /> </path> </target> <target name="show.dependencies" depends="define.dependency.task"> <dependencylist componentDescriptor="${component.descriptor}" verbose="on"> <dependencies dir="${carrot2.cvs.dir}/lib"> <include name="*.dep.xml" /> </dependencies> </dependencylist> </target> <target name="collect.dependencies" depends="prepare"> <dependencylist componentDescriptor="${component.descriptor}" verbose="on" fileListId="component.dep.flist"> <dependencies dir="${carrot2.cvs.dir}/lib"> <include name="*.dep.xml" /> </dependencies> </dependencylist> <copyfilelist todir="${distribution.dir}"> <filelist refid="component.dep.flist" /> </copyfilelist> </target> <!-- }}} --> <!-- ##################################### --> <!-- ### {{{ COMPILE SOURCE FILES ### --> <!-- ##################################### --> <target name="compile" depends="prepare,egothor-info" if="cond:egothor.available"> <javac destdir = "${build.dir}" debug = "${java.debug}" optimize = "${java.optimize}" deprecation = "on" includeantruntime = "false" includejavaruntime = "false" > <!-- add source code paths. --> <src path="${src.path}" /> <exclude name="**/*Test.java"/> <classpath refid="classpath.dependencies" /> <classpath location="${carrot2.cvs.dir}/lib/compile-time-only/servlet.jar" /> <classpath> <fileset dir="${egothor.dir}" includes="WEB-INF/lib/*.jar" /> <pathelement location="${egothor.dir}/WEB-INF/classes" /> </classpath> </javac> <!-- copy any non-java files (resources) from the source path. --> <copy toDir="${build.dir}"> <fileset dir="${src.path}"> <exclude name="**/*.java"/> </fileset> </copy> </target> <target name="egothor-info" unless="cond:egothor.available"> <echo> WARNING: Egothor installation directory is not available. Specify Egothor's WebApp installation directory location in 'egothor.dir' property. </echo> </target> <!-- }}} --> <!-- ##################################### --> <!-- ### {{{ build jar file ### --> <!-- ##################################### --> <target name="build" depends="compile" if="cond:egothor.available"> <tstamp /> <jar update="false" jarfile="${distribution.dir}/${dist.name}.jar"> <fileset dir="${build.dir}" /> <manifest> <attribute name="Assembly-date" value="${DSTAMP} ${TSTAMP}"/> </manifest> </jar> </target> <!-- }}} --> <!-- ##################################### --> <!-- ### {{{ HELP ON THIS FILE ### --> <!-- ##################################### --> <target name="help" description="Displays help on available targets."> <echo> Project name: ${ant.project.name} Current JDK: ${ant.java.version} Basedir : ${basedir} ----------------------------------------------------- Available targets: clean Removes all temporary files. compile Compiles the project. build Builds WAR file </echo> </target> <!-- }}} --> </project> |
From: <daw...@us...> - 2004-02-08 11:02:17
|
Update of /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/src/com/dawidweiss/carrot/input/egothor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10581/src/com/dawidweiss/carrot/input/egothor Log Message: Directory /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/src/com/dawidweiss/carrot/input/egothor added to the repository |
From: <daw...@us...> - 2004-02-08 11:02:09
|
Update of /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/src/com/dawidweiss/carrot/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10526/src/com/dawidweiss/carrot/input Log Message: Directory /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/src/com/dawidweiss/carrot/input added to the repository |
From: <daw...@us...> - 2004-02-08 11:01:52
|
Update of /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/src/com/dawidweiss/carrot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10456/src/com/dawidweiss/carrot Log Message: Directory /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/src/com/dawidweiss/carrot added to the repository |
From: <daw...@us...> - 2004-02-08 11:01:42
|
Update of /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/src/com/dawidweiss In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10403/src/com/dawidweiss Log Message: Directory /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/src/com/dawidweiss added to the repository |
From: <daw...@us...> - 2004-02-08 11:01:16
|
Update of /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/src/com In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10361/src/com Log Message: Directory /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/src/com added to the repository |
From: <daw...@us...> - 2004-02-08 11:00:50
|
Update of /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10206/doc Log Message: Directory /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/doc added to the repository |
From: <daw...@us...> - 2004-02-08 11:00:50
|
Update of /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10206/src Log Message: Directory /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor/src added to the repository |
From: <daw...@us...> - 2004-02-08 10:59:58
|
Update of /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9956/adapter-egothor Log Message: Directory /cvsroot/carrot2/carrot2/components/inputs/adapter-egothor added to the repository |
From: <daw...@us...> - 2004-02-07 08:29:00
|
Update of /cvsroot/carrot2/carrot2/components/filters/clustering/lingo-clustering In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32299/components/filters/clustering/lingo-clustering Modified Files: build.xml Log Message: Small adjustments to build files (missing lib folders) Index: build.xml =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/filters/clustering/lingo-clustering/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** build.xml 6 Feb 2004 18:16:21 -0000 1.3 --- build.xml 7 Feb 2004 08:02:17 -0000 1.4 *************** *** 127,133 **** --- 127,135 ---- <!-- copy libraries --> + <!-- no libraries at the moment. <copy filtering="false" flatten="true" includeemptydirs="true" todir="${build.dir}/WEB-INF/lib"> <fileset dir="lib" includes="**/*.jar" /> </copy> + --> </target> <!-- }}} --> *************** *** 150,154 **** </classes> ! <lib dir="lib" /> </war> --- 152,156 ---- </classes> ! <lib dir="${build.dir}/WEB-INF/lib" /> </war> |
From: <daw...@us...> - 2004-02-07 08:05:16
|
Update of /cvsroot/carrot2/carrot2/components/filters/linguistic/pl-eng-stemming In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32299/components/filters/linguistic/pl-eng-stemming Modified Files: build.xml Log Message: Small adjustments to build files (missing lib folders) Index: build.xml =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/filters/linguistic/pl-eng-stemming/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** build.xml 6 Feb 2004 18:16:23 -0000 1.3 --- build.xml 7 Feb 2004 08:02:18 -0000 1.4 *************** *** 129,135 **** --- 129,137 ---- <!-- copy libraries --> + <!-- <copy filtering="false" flatten="true" includeemptydirs="true" todir="${build.dir}/WEB-INF/lib"> <fileset dir="lib" includes="**/*.jar" /> </copy> + --> </target> <!-- }}} --> *************** *** 152,156 **** </classes> ! <lib dir="lib" /> </war> --- 154,158 ---- </classes> ! <lib dir="${build.dir}/WEB-INF/lib" /> </war> |
From: <daw...@us...> - 2004-02-06 18:19:44
|
Update of /cvsroot/carrot2/carrot2/components/inputs/treeSnippetMiner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4867/components/inputs/treeSnippetMiner Modified Files: build.xml Added Files: tree-snippet-miner.dep.xml Log Message: [new], component: global Added a new ANT task to manage JAR interdependencies in the project. Now you can easily collect all JARs that a component requires, plus only these JARs are use d at compile-time. Try using these targets on build files of components: 'ant show.dependencies' (shows all required components and JAR files), 'ant collect.dependencies' (copies the required JARs to the distribution.dir folder). [refactoring], component: global Build files have changed, so ANT1.6 is now a requirement. --- NEW FILE: tree-snippet-miner.dep.xml --- <!-- A dependency descriptor. This has to be updated manually when new JARs are required. --> <component name="tree-snippet-miner"> <dependency name="carrot2-shared-lib" /> <!-- this could be removed in favor of jdk 1.4? --> <dependency name="gnu-regexp" /> </component> Index: build.xml =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/inputs/treeSnippetMiner/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** build.xml 23 Nov 2003 23:37:54 -0000 1.3 --- build.xml 6 Feb 2004 18:16:26 -0000 1.4 *************** *** 22,39 **** <property name="javac.debug" value="on" /> - <!-- ## classpath for compiling classes ## --> - - <path id="carrot.shared.libs"> - <!-- all jars runtime/shared/lib --> - <fileset dir="${carrot2.cvs.dir}/lib"> - <include name="**/*.jar"/> - </fileset> - </path> - - <!-- ## project classpath ### --> - <path id="compile.classpath"> - <path refid="carrot.shared.libs" /> - </path> - <!-- ##################################### --> <!-- ### {{{ CLEAN ### --> --- 22,25 ---- *************** *** 51,55 **** <!-- ##################################### --> ! <target name="prepare"> <mkdir dir="${distribution.dir}" /> <mkdir dir="${build.dir}" /> --- 37,41 ---- <!-- ##################################### --> ! <target name="prepare" depends="generate.dependency.path"> <mkdir dir="${distribution.dir}" /> <mkdir dir="${build.dir}" /> *************** *** 71,76 **** includeantruntime = "false" includejavaruntime = "false" - classpathref = "compile.classpath" > <!-- add source code paths. --> <src path="${src.path}" /> --- 57,63 ---- includeantruntime = "false" includejavaruntime = "false" > + <classpath refid="classpath.dependencies" /> + <classpath location="${carrot2.cvs.dir}/lib/compile-time-only/servlet.jar" /> <!-- add source code paths. --> <src path="${src.path}" /> *************** *** 93,96 **** --- 80,132 ---- <!-- }}} --> + <!-- ##################################### --> + <!-- ### {{{ DEPENDENCY analysis ### --> + <!-- ##################################### --> + <property name="component.descriptor" location="tree-snippet-miner.dep.xml" /> + + <target name="define.dependency.task"> + <taskdef resource="com/dawidweiss/carrot/ant/dependencies.antlib.xml"> + <classpath location="${carrot2.cvs.dir}/lib/carrot2-shared-lib.jar" /> + </taskdef> + </target> + + <target name="generate.dependency.path" depends="define.dependency.task"> + <dependencylist + property="component.dep" + fileListId="component.dep.flist" + componentDescriptor="${component.descriptor}" + verbose="false" + > + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + <path id="classpath.dependencies"> + <filelist refid="component.dep.flist" /> + </path> + </target> + + <target name="show.dependencies" depends="define.dependency.task"> + <dependencylist componentDescriptor="${component.descriptor}" verbose="on"> + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + </target> + + <target name="collect.dependencies" depends="prepare"> + <dependencylist componentDescriptor="${component.descriptor}" verbose="on" + fileListId="component.dep.flist"> + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + + <copyfilelist todir="${distribution.dir}"> + <filelist refid="component.dep.flist" /> + </copyfilelist> + </target> + <!-- }}} --> + <!-- ##################################### --> |
From: <daw...@us...> - 2004-02-06 18:19:43
|
Update of /cvsroot/carrot2/carrot2/components/inputs/verbatim-input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4867/components/inputs/verbatim-input Modified Files: build.xml Added Files: verbatim-input.dep.xml Log Message: [new], component: global Added a new ANT task to manage JAR interdependencies in the project. Now you can easily collect all JARs that a component requires, plus only these JARs are use d at compile-time. Try using these targets on build files of components: 'ant show.dependencies' (shows all required components and JAR files), 'ant collect.dependencies' (copies the required JARs to the distribution.dir folder). [refactoring], component: global Build files have changed, so ANT1.6 is now a requirement. --- NEW FILE: verbatim-input.dep.xml --- <!-- A dependency descriptor. This has to be updated manually when new JARs are required. --> <component name="verbatim-input"> <dependency name="carrot2-shared-lib" /> </component> Index: build.xml =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/inputs/verbatim-input/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** build.xml 23 Nov 2003 23:37:55 -0000 1.2 --- build.xml 6 Feb 2004 18:16:26 -0000 1.3 *************** *** 22,39 **** <property name="javac.debug" value="on" /> - <!-- ## classpath for compiling classes ## --> - - <path id="carrot.shared.libs"> - <!-- all jars runtime/shared/lib --> - <fileset dir="${carrot2.cvs.dir}/lib"> - <include name="**/*.jar"/> - </fileset> - </path> - - <!-- ## project classpath ### --> - <path id="compile.classpath"> - <path refid="carrot.shared.libs" /> - </path> - <!-- ##################################### --> <!-- ### {{{ CLEAN ### --> --- 22,25 ---- *************** *** 51,55 **** <!-- ##################################### --> ! <target name="prepare"> <mkdir dir="${distribution.dir}" /> <mkdir dir="${build.dir}" /> --- 37,41 ---- <!-- ##################################### --> ! <target name="prepare" depends="generate.dependency.path"> <mkdir dir="${distribution.dir}" /> <mkdir dir="${build.dir}" /> *************** *** 59,62 **** --- 45,100 ---- </target> <!-- }}} --> + + + <!-- ##################################### --> + <!-- ### {{{ DEPENDENCY analysis ### --> + <!-- ##################################### --> + <property name="component.descriptor" location="verbatim-input.dep.xml" /> + + <target name="define.dependency.task"> + <taskdef resource="com/dawidweiss/carrot/ant/dependencies.antlib.xml"> + <classpath location="${carrot2.cvs.dir}/lib/carrot2-shared-lib.jar" /> + </taskdef> + </target> + + <target name="generate.dependency.path" depends="define.dependency.task"> + <dependencylist + property="component.dep" + fileListId="component.dep.flist" + componentDescriptor="${component.descriptor}" + verbose="false" + > + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + <path id="classpath.dependencies"> + <filelist refid="component.dep.flist" /> + </path> + </target> + + <target name="show.dependencies" depends="define.dependency.task"> + <dependencylist componentDescriptor="${component.descriptor}" verbose="on"> + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + </target> + + <target name="collect.dependencies" depends="prepare"> + <dependencylist componentDescriptor="${component.descriptor}" verbose="on" + fileListId="component.dep.flist"> + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + + <copyfilelist todir="${distribution.dir}"> + <filelist refid="component.dep.flist" /> + </copyfilelist> + </target> + <!-- }}} --> + + *************** *** 72,77 **** includeantruntime = "false" includejavaruntime = "false" - classpathref = "compile.classpath" > <!-- add source code paths. --> <src path="${src.path}" /> --- 110,116 ---- includeantruntime = "false" includejavaruntime = "false" > + <classpath refid="classpath.dependencies" /> + <classpath location="${carrot2.cvs.dir}/lib/compile-time-only/servlet.jar" /> <!-- add source code paths. --> <src path="${src.path}" /> |
From: <daw...@us...> - 2004-02-06 18:19:43
|
Update of /cvsroot/carrot2/carrot2/components/outputs/xslt-renderer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4867/components/outputs/xslt-renderer Modified Files: build.xml Added Files: xslt-renderer.dep.xml Log Message: [new], component: global Added a new ANT task to manage JAR interdependencies in the project. Now you can easily collect all JARs that a component requires, plus only these JARs are use d at compile-time. Try using these targets on build files of components: 'ant show.dependencies' (shows all required components and JAR files), 'ant collect.dependencies' (copies the required JARs to the distribution.dir folder). [refactoring], component: global Build files have changed, so ANT1.6 is now a requirement. --- NEW FILE: xslt-renderer.dep.xml --- <!-- A dependency descriptor. This has to be updated manually when new JARs are required. --> <component name="xslt-renderer"> <dependency name="carrot2-shared-lib" /> <!-- runtime dependency (for xslt processor) --> <dependency name="saxon" /> </component> Index: build.xml =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/outputs/xslt-renderer/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** build.xml 23 Nov 2003 23:37:55 -0000 1.2 --- build.xml 6 Feb 2004 18:16:27 -0000 1.3 *************** *** 22,39 **** <property name="javac.debug" value="on" /> - <!-- ## classpath for compiling classes ## --> - - <path id="carrot.shared.libs"> - <!-- all jars runtime/shared/lib --> - <fileset dir="${carrot2.cvs.dir}/lib"> - <include name="**/*.jar"/> - </fileset> - </path> - - <!-- ## project classpath ### --> - <path id="compile.classpath"> - <path refid="carrot.shared.libs" /> - </path> - <!-- ##################################### --> <!-- ### {{{ CLEAN ### --> --- 22,25 ---- *************** *** 46,49 **** --- 32,85 ---- <!-- }}} --> + <!-- ##################################### --> + <!-- ### {{{ DEPENDENCY analysis ### --> + <!-- ##################################### --> + <property name="component.descriptor" location="xslt-renderer.dep.xml" /> + + <target name="define.dependency.task"> + <taskdef resource="com/dawidweiss/carrot/ant/dependencies.antlib.xml"> + <classpath location="${carrot2.cvs.dir}/lib/carrot2-shared-lib.jar" /> + </taskdef> + </target> + + <target name="generate.dependency.path" depends="define.dependency.task"> + <dependencylist + property="component.dep" + fileListId="component.dep.flist" + componentDescriptor="${component.descriptor}" + verbose="false" + > + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + <path id="classpath.dependencies"> + <filelist refid="component.dep.flist" /> + </path> + </target> + + <target name="show.dependencies" depends="define.dependency.task"> + <dependencylist componentDescriptor="${component.descriptor}" verbose="on"> + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + </target> + + <target name="collect.dependencies" depends="prepare"> + <dependencylist componentDescriptor="${component.descriptor}" verbose="on" + fileListId="component.dep.flist"> + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + + <copyfilelist todir="${distribution.dir}"> + <filelist refid="component.dep.flist" /> + </copyfilelist> + </target> + <!-- }}} --> + + <!-- ##################################### --> *************** *** 51,55 **** <!-- ##################################### --> ! <target name="prepare"> <mkdir dir="${distribution.dir}" /> <mkdir dir="${build.dir}" /> --- 87,91 ---- <!-- ##################################### --> ! <target name="prepare" depends="generate.dependency.path"> <mkdir dir="${distribution.dir}" /> <mkdir dir="${build.dir}" /> *************** *** 72,77 **** includeantruntime = "false" includejavaruntime = "false" - classpathref = "compile.classpath" > <!-- add source code paths. --> <src path="${src.path}" /> --- 108,114 ---- includeantruntime = "false" includejavaruntime = "false" > + <classpath refid="classpath.dependencies" /> + <classpath location="${carrot2.cvs.dir}/lib/compile-time-only/servlet.jar" /> <!-- add source code paths. --> <src path="${src.path}" /> |
From: <daw...@us...> - 2004-02-06 18:19:43
|
Update of /cvsroot/carrot2/carrot2/components/filters/clustering/stc-clustering In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4867/components/filters/clustering/stc-clustering Modified Files: build.xml Added Files: stc-clustering.dep.xml Removed Files: stc.todo.txt Log Message: [new], component: global Added a new ANT task to manage JAR interdependencies in the project. Now you can easily collect all JARs that a component requires, plus only these JARs are use d at compile-time. Try using these targets on build files of components: 'ant show.dependencies' (shows all required components and JAR files), 'ant collect.dependencies' (copies the required JARs to the distribution.dir folder). [refactoring], component: global Build files have changed, so ANT1.6 is now a requirement. --- NEW FILE: stc-clustering.dep.xml --- <!-- A dependency descriptor. This has to be updated manually when new JARs are required. --> <component name="stc-clustering"> <dependency name="carrot2-shared-lib" /> </component> Index: build.xml =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/filters/clustering/stc-clustering/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** build.xml 23 Nov 2003 23:37:54 -0000 1.2 --- build.xml 6 Feb 2004 18:16:23 -0000 1.3 *************** *** 22,39 **** <property name="javac.debug" value="on" /> - <!-- ## classpath for compiling classes ## --> - - <path id="carrot.shared.libs"> - <!-- all jars runtime/shared/lib --> - <fileset dir="${carrot2.cvs.dir}/lib"> - <include name="**/*.jar"/> - </fileset> - </path> - - <!-- ## project classpath ### --> - <path id="compile.classpath"> - <path refid="carrot.shared.libs" /> - </path> - <!-- ##################################### --> <!-- ### {{{ CLEAN ### --> --- 22,25 ---- *************** *** 51,55 **** <!-- ##################################### --> ! <target name="prepare"> <mkdir dir="${distribution.dir}" /> <mkdir dir="${build.dir}" /> --- 37,41 ---- <!-- ##################################### --> ! <target name="prepare" depends="generate.dependency.path"> <mkdir dir="${distribution.dir}" /> <mkdir dir="${build.dir}" /> *************** *** 72,77 **** includeantruntime = "false" includejavaruntime = "false" - classpathref = "compile.classpath" > <!-- add source code paths. --> <src path="${src.path}" /> --- 58,65 ---- includeantruntime = "false" includejavaruntime = "false" > + <classpath refid="classpath.dependencies" /> + <classpath location="${carrot2.cvs.dir}/lib/compile-time-only/servlet.jar" /> + <!-- add source code paths. --> <src path="${src.path}" /> *************** *** 94,97 **** --- 82,133 ---- <!-- }}} --> + <!-- ##################################### --> + <!-- ### {{{ DEPENDENCY analysis ### --> + <!-- ##################################### --> + <property name="component.descriptor" location="stc-clustering.dep.xml" /> + + <target name="define.dependency.task"> + <taskdef resource="com/dawidweiss/carrot/ant/dependencies.antlib.xml"> + <classpath location="${carrot2.cvs.dir}/lib/carrot2-shared-lib.jar" /> + </taskdef> + </target> + + <target name="generate.dependency.path" depends="define.dependency.task"> + <dependencylist + property="component.dep" + fileListId="component.dep.flist" + componentDescriptor="${component.descriptor}" + verbose="false" + > + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + <path id="classpath.dependencies"> + <filelist refid="component.dep.flist" /> + </path> + </target> + + <target name="show.dependencies" depends="define.dependency.task"> + <dependencylist componentDescriptor="${component.descriptor}" verbose="on"> + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + </target> + + <target name="collect.dependencies" depends="prepare"> + <dependencylist componentDescriptor="${component.descriptor}" verbose="on" + fileListId="component.dep.flist"> + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + + <copyfilelist todir="${distribution.dir}"> + <filelist refid="component.dep.flist" /> + </copyfilelist> + </target> + <!-- }}} --> <!-- ##################################### --> --- stc.todo.txt DELETED --- |
From: <daw...@us...> - 2004-02-06 18:19:43
|
Update of /cvsroot/carrot2/carrot2/components/inputs/adapter-nutch In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4867/components/inputs/adapter-nutch Modified Files: .classpath build.xml Added Files: adapter-nutch.dep.xml Log Message: [new], component: global Added a new ANT task to manage JAR interdependencies in the project. Now you can easily collect all JARs that a component requires, plus only these JARs are use d at compile-time. Try using these targets on build files of components: 'ant show.dependencies' (shows all required components and JAR files), 'ant collect.dependencies' (copies the required JARs to the distribution.dir folder). [refactoring], component: global Build files have changed, so ANT1.6 is now a requirement. --- NEW FILE: adapter-nutch.dep.xml --- <!-- A dependency descriptor. This has to be updated manually when new JARs are required. --> <component name="adapter-nutch"> <dependency name="carrot2-shared-lib-only" /> </component> Index: .classpath =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/inputs/adapter-nutch/.classpath,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .classpath 4 Feb 2004 20:32:14 -0000 1.1 --- .classpath 6 Feb 2004 18:16:25 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- <classpathentry kind="var" path="CARROT2_CVS/lib/compile-time-only/servlet.jar"/> <classpathentry kind="lib" path="lib/nutch-2003-11-17.jar"/> + <classpathentry kind="var" path="CARROT2_CVS/lib/carrot2-shared-lib.jar"/> <classpathentry kind="output" path="tmp/build/"/> </classpath> Index: build.xml =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/inputs/adapter-nutch/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.xml 4 Feb 2004 20:32:14 -0000 1.1 --- build.xml 6 Feb 2004 18:16:25 -0000 1.2 *************** *** 21,38 **** <property name="javac.debug" value="on" /> - <!-- ## classpath for compiling classes ## --> - - <path id="carrot.shared.libs"> - <!-- all jars runtime/shared/lib --> - <fileset dir="${carrot2.cvs.dir}/lib"> - <include name="**/*.jar"/> - </fileset> - </path> - - <!-- ## project classpath ### --> - <path id="compile.classpath"> - <path refid="carrot.shared.libs" /> - </path> - <!-- ##################################### --> <!-- ### {{{ CLEAN ### --> --- 21,24 ---- *************** *** 63,67 **** </target> ! <target name="prepare" depends="check-nutch-available" if="cond:nutch.available"> <mkdir dir="${distribution.dir}" /> <mkdir dir="${build.dir}" /> --- 49,53 ---- </target> ! <target name="prepare" depends="check-nutch-available, generate.dependency.path" if="cond:nutch.available"> <mkdir dir="${distribution.dir}" /> <mkdir dir="${build.dir}" /> *************** *** 69,72 **** --- 55,106 ---- <!-- }}} --> + <!-- ##################################### --> + <!-- ### {{{ DEPENDENCY analysis ### --> + <!-- ##################################### --> + <property name="component.descriptor" location="adapter-nutch.dep.xml" /> + + <target name="define.dependency.task"> + <taskdef resource="com/dawidweiss/carrot/ant/dependencies.antlib.xml"> + <classpath location="${carrot2.cvs.dir}/lib/carrot2-shared-lib.jar" /> + </taskdef> + </target> + + <target name="generate.dependency.path" depends="define.dependency.task"> + <dependencylist + property="component.dep" + fileListId="component.dep.flist" + componentDescriptor="${component.descriptor}" + verbose="false" + > + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + <path id="classpath.dependencies"> + <filelist refid="component.dep.flist" /> + </path> + </target> + + <target name="show.dependencies" depends="define.dependency.task"> + <dependencylist componentDescriptor="${component.descriptor}" verbose="on"> + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + </target> + + <target name="collect.dependencies" depends="prepare"> + <dependencylist componentDescriptor="${component.descriptor}" verbose="on" + fileListId="component.dep.flist"> + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + + <copyfilelist todir="${distribution.dir}"> + <filelist refid="component.dep.flist" /> + </copyfilelist> + </target> + <!-- }}} --> <!-- ##################################### --> *************** *** 85,89 **** <src path="${src.path}" /> <exclude name="**/*Test.java"/> ! <classpath refid="compile.classpath" /> <classpath> <fileset dir="lib" includes="**/*.jar" /> --- 119,124 ---- <src path="${src.path}" /> <exclude name="**/*Test.java"/> ! <classpath refid="classpath.dependencies" /> ! <classpath location="${carrot2.cvs.dir}/lib/compile-time-only/servlet.jar" /> <classpath> <fileset dir="lib" includes="**/*.jar" /> |
From: <daw...@us...> - 2004-02-06 18:19:43
|
Update of /cvsroot/carrot2/carrot2/components/inputs/snippet-generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4867/components/inputs/snippet-generator Modified Files: build.xml Added Files: snippet-generator.dep.xml Log Message: [new], component: global Added a new ANT task to manage JAR interdependencies in the project. Now you can easily collect all JARs that a component requires, plus only these JARs are use d at compile-time. Try using these targets on build files of components: 'ant show.dependencies' (shows all required components and JAR files), 'ant collect.dependencies' (copies the required JARs to the distribution.dir folder). [refactoring], component: global Build files have changed, so ANT1.6 is now a requirement. --- NEW FILE: snippet-generator.dep.xml --- <!-- A dependency descriptor. This has to be updated manually when new JARs are required. --> <component name="snippet-generator"> <dependency name="carrot2-shared-lib" /> <dependency name="colt" /> </component> Index: build.xml =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/inputs/snippet-generator/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** build.xml 23 Nov 2003 23:37:54 -0000 1.2 --- build.xml 6 Feb 2004 18:16:26 -0000 1.3 *************** *** 22,39 **** <property name="javac.debug" value="on" /> - <!-- ## classpath for compiling classes ## --> - - <path id="carrot.shared.libs"> - <!-- all jars runtime/shared/lib --> - <fileset dir="${carrot2.cvs.dir}/lib"> - <include name="**/*.jar"/> - </fileset> - </path> - - <!-- ## project classpath ### --> - <path id="compile.classpath"> - <path refid="carrot.shared.libs" /> - </path> - <!-- ##################################### --> <!-- ### {{{ CLEAN ### --> --- 22,25 ---- *************** *** 51,55 **** <!-- ##################################### --> ! <target name="prepare"> <mkdir dir="${distribution.dir}" /> <mkdir dir="${build.dir}" /> --- 37,41 ---- <!-- ##################################### --> ! <target name="prepare" depends="generate.dependency.path"> <mkdir dir="${distribution.dir}" /> <mkdir dir="${build.dir}" /> *************** *** 60,63 **** --- 46,99 ---- <!-- }}} --> + <!-- ##################################### --> + <!-- ### {{{ DEPENDENCY analysis ### --> + <!-- ##################################### --> + <property name="component.descriptor" location="snippet-generator.dep.xml" /> + + <target name="define.dependency.task"> + <taskdef resource="com/dawidweiss/carrot/ant/dependencies.antlib.xml"> + <classpath location="${carrot2.cvs.dir}/lib/carrot2-shared-lib.jar" /> + </taskdef> + </target> + + <target name="generate.dependency.path" depends="define.dependency.task"> + <dependencylist + property="component.dep" + fileListId="component.dep.flist" + componentDescriptor="${component.descriptor}" + verbose="false" + > + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + <path id="classpath.dependencies"> + <filelist refid="component.dep.flist" /> + </path> + </target> + + <target name="show.dependencies" depends="define.dependency.task"> + <dependencylist componentDescriptor="${component.descriptor}" verbose="on"> + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + </target> + + <target name="collect.dependencies" depends="prepare"> + <dependencylist componentDescriptor="${component.descriptor}" verbose="on" + fileListId="component.dep.flist"> + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + + <copyfilelist todir="${distribution.dir}"> + <filelist refid="component.dep.flist" /> + </copyfilelist> + </target> + <!-- }}} --> + + <!-- ##################################### --> *************** *** 72,77 **** includeantruntime = "false" includejavaruntime = "false" - classpathref = "compile.classpath" > <!-- add source code paths. --> <src path="${src.path}" /> --- 108,114 ---- includeantruntime = "false" includejavaruntime = "false" > + <classpath refid="classpath.dependencies" /> + <classpath location="${carrot2.cvs.dir}/lib/compile-time-only/servlet.jar" /> <!-- add source code paths. --> <src path="${src.path}" /> |