Package org.carrot2.core

Examples of org.carrot2.core.DummyControllerContext.dispose()


            ProcessingResult result = controller.process(attributes, Bing3WebDocumentSource.class);
            Persister p = new Persister();
            p.write(result, new File("result.xml"));
        } finally {
            controller.dispose();
        }       
    }
}
View Full Code Here


                ModuloDocumentSource.class,
                ByFirstTitleLetterClusteringAlgorithm.class);

            ConsoleFormatter.displayResults(result);
        } finally {
            controller.dispose();
        }
    }
}
View Full Code Here

            assertThat(highlightedDocument.getField(Document.SUMMARY + QueryWordHighlighter.HIGHLIGHTED_FIELD_NAME_SUFFIX))
                .isEqualTo(expectedSnippet);
        }
        finally
        {
            controller.dispose();
        }
    }
}
View Full Code Here

            AttributeNames.DOCUMENTS, (Object) DOCUMENTS_DATA_MINING);

        controller.process(processingAttributes, getComponentClass());
        controller.process(processingAttributes, getComponentClass());

        controller.dispose();
    }

    /**
     * Performs a very simple stress test using a pooling {@link Controller}. The
     * test is performed with default init attributes.
View Full Code Here

        Controller controller = getSimpleController(initAttributes);
        try {
            ProcessingResult process = controller.process(processingAttributes, getComponentClass());
            return process;
        } finally {
            controller.dispose();
            super.simpleController = null;
        }
    }

    /**
 
View Full Code Here

                }
                documents = documentsLocal;
                index++;
            }
        } finally {
            controller.dispose();
            executorService.shutdown();
        }
    }

    /**
 
View Full Code Here

        source.feedUrlTemplate = "http://test.com?sp=${startPage}&q=${searchTerms}&c=${count}";
        source.resultsPerPage = 20;

        final DummyControllerContext ctx = new DummyControllerContext();
        source.init(ctx);
        ctx.dispose();
    }

    private void testFeedTemplate(String template)
    {
        final OpenSearchDocumentSource source = new OpenSearchDocumentSource();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.