Skip to main content

Posts

Showing posts from 2015

resource file path in JAR file

See the thing is, a jar is a single file (kind of like a zip file) holding lots of files together. From Os's pov, its a single file and if you want to access a  part of the file (your image file) you must use it as a stream. Reference: http://stackoverflow.com/questions/18055189/why-my-uri-is-not-hierarchical

Carrot2 text clustering examples

Reference link: https://github.com/carrot2/carrot2/blob/master/applications/carrot2-examples/examples/org/carrot2/examples/clustering/ClusteringDocumentList.java http://www.programcreek.com/java-api-examples/index.php?api=org.carrot2.clustering.lingo.LingoClusteringAlgorithm /* * Carrot2 project. * * Copyright (C) 2002-2015, Dawid Weiss, Stanisław Osiński. * All rights reserved. * * Refer to the full license file "carrot2.LICENSE" * in the root folder of the repository checkout or at: * http://www.carrot2.org/carrot2.LICENSE */ package org.carrot2.examples ; import java.text.NumberFormat ; import java.util.Collection ; import java.util.Map ; import org.apache.commons.lang.StringUtils ; import org.carrot2.core.Cluster ; import org.carrot2.core.Document ; import org.carrot2.core.ProcessingResult ; import org.carrot2.core.attribute.CommonAttributesDescriptor ; /** * Simple console formatter for dumping {@link ProcessingResult}.