How can I split a text into sentences using the Stanford parser?

You can check the DocumentPreprocessor class. Below is a short snippet. I think there may be other ways to do what you want. String paragraph = “My 1st sentence. “Does it work for questions?” My third sentence.”; Reader reader = new StringReader(paragraph); DocumentPreprocessor dp = new DocumentPreprocessor(reader); List<String> sentenceList = new ArrayList<String>(); for (List<HasWord> sentence … Read more

Unsupervised clustering with unknown number of clusters

You can use hierarchical clustering. It is a rather basic approach, so there are lots of implementations available. It is for example included in Python’s scipy. See for example the following script: import matplotlib.pyplot as plt import numpy import scipy.cluster.hierarchy as hcluster # generate 3 clusters of each around 100 points and one orphan point … Read more

Epoch vs Iteration when training neural networks [closed]

In the neural network terminology: one epoch = one forward pass and one backward pass of all the training examples batch size = the number of training examples in one forward/backward pass. The higher the batch size, the more memory space you’ll need. number of iterations = number of passes, each pass using [batch size] … Read more

Random Numbers in Unity3D?

In Unity C# the method is as follows Random.Range(minVal, maxVal); See Unity Documentation – Random The method will accept either integer or float arguments. If using ints minVal is inclusive and maxVal is exclusive of the returned random value. In your case it would be: Random.Range(1,4); Instead of Next(1,4). If using floats, for example Random.Range(1.0F, … Read more

Is it possible for a computer to “learn” a regular expression by user-provided examples?

Yes, it is possible, we can generate regexes from examples (text -> desired extractions). This is a working online tool which does the job: http://regex.inginf.units.it/ Regex Generator++ online tool generates a regex from provided examples using a GP search algorithm. The GP algorithm is driven by a multiobjective fitness which leads to higher performance and … Read more

What’s is the difference between train, validation and test set, in neural networks?

The training and validation sets are used during training. for each epoch for each training data instance propagate error through the network adjust the weights calculate the accuracy over training data for each validation data instance calculate the accuracy over the validation data if the threshold validation accuracy is met exit training else continue training … Read more

Clarification on a Neural Net that plays Snake

In this post, I will advise you of: How to map navigational instructions to action sequences with an LSTM neural network Resources that will help you learn how to use neural networks to accomplish your task How to install and configure neural network libraries based on what I needed to learn the hard way General … Read more

What is the role of the bias in neural networks? [closed]

I think that biases are almost always helpful. In effect, a bias value allows you to shift the activation function to the left or right, which may be critical for successful learning. It might help to look at a simple example. Consider this 1-input, 1-output network that has no bias: The output of the network … Read more