src/main/java/org/sv4j/core/NeuralNetwork.java
/**
     * @param s message to validate
     * @return validation result
     * @throws MessageReadingException unable to read message
     */
@param s message to validate
@return validation result
@throws MessageReadingException unable to read message
@param s message to validate @return validation result @throws MessageReadingException unable to read message
public NeuralNetOutput testSubject(String s) throws MessageReadingException {
        DataSetIterator testIter = NeuralNetwork.getDataSetIterator(wordVec, batchSize, truncateReviewsToLength, rng);
        try {
            INDArray featuresFirstNegative = ((CnnSentenceDataSetIterator)testIter).loadSingleSentence(s);
            INDArray predictions = multiLayerNetwork.outputSingle(featuresFirstNegative);
            return new NeuralNetOutput(predictions.getDouble(0),predictions.getDouble(1));
        }catch (org.nd4j.linalg.exception.ND4JIllegalStateException e){
            throw new MessageReadingException("Can not process:"+s,e);
        }
    }
public NeuralNetOutput testSubject ( String s ) throws MessageReadingException { DataSetIterator testIter = NeuralNetwork . getDataSetIterator ( wordVec , batchSize , truncateReviewsToLength , rng ) ; try { INDArray featuresFirstNegative = ( ( CnnSentenceDataSetIterator ) testIter ) . loadSingleSentence ( s ) ; INDArray predictions = multiLayerNetwork . outputSingle ( featuresFirstNegative ) ; return new NeuralNetOutput ( predictions . getDouble ( 0 ) , predictions . getDouble ( 1 ) ) ; } catch ( org . nd4j . linalg . exception . ND4JIllegalStateException e ) { throw new MessageReadingException ( "Can not process:" + s , e ) ; } }
@param s message to validate
 @return validation result
 @throws MessageReadingException unable to read message
@param s message to validate @return validation result @throws MessageReadingException unable to read message