/** * Constructs a new instance using the provided properties for * configuration. */ public LocalityPreservingCooccurrenceSpace(AffinityMatrixCreator creator, Properties properties) { affinityCreator = creator; cooccurrenceMatrix = new GrowingSparseMatrix(); atomicMatrix = Matrices.synchronizedMatrix(cooccurrenceMatrix); reduced = null; termToIndex = new ConcurrentHashMap<String,Integer>(); wordIndexCounter = 0; String windowSizeProp = properties.getProperty(WINDOW_SIZE_PROPERTY); windowSize = (windowSizeProp != null) ? Integer.parseInt(windowSizeProp) : DEFAULT_WINDOW_SIZE; weighting = ReflectionUtil.getObjectInstance( properties.getProperty( WEIGHTING_FUNCTION_PROPERTY, DEFAULT_WEIGHTING)); }
/** * Constructs a new instance using the provided properties for * configuration. */ public LocalityPreservingCooccurrenceSpace(AffinityMatrixCreator creator, Properties properties) { affinityCreator = creator; cooccurrenceMatrix = new GrowingSparseMatrix(); atomicMatrix = Matrices.synchronizedMatrix(cooccurrenceMatrix); reduced = null; termToIndex = new ConcurrentHashMap<String,Integer>(); wordIndexCounter = 0; String windowSizeProp = properties.getProperty(WINDOW_SIZE_PROPERTY); windowSize = (windowSizeProp != null) ? Integer.parseInt(windowSizeProp) : DEFAULT_WINDOW_SIZE; weighting = ReflectionUtil.getObjectInstance( properties.getProperty( WEIGHTING_FUNCTION_PROPERTY, DEFAULT_WEIGHTING)); }
m = Matrices.synchronizedMatrix(loadText(is)); break; case BINARY: m = Matrices.synchronizedMatrix(loadBinary(is)); break;
m = Matrices.synchronizedMatrix(loadText(is)); break; case BINARY: m = Matrices.synchronizedMatrix(loadBinary(is)); break;