How is the data classified as long-term memory and short-term memory? Is there some standards programmers set?
I recommend you to read http://colah.github.io/posts/2015-08-Understanding-LSTMs/
The long-term memory is constructed in the "bus" on the top, where the previous value can be passed, depends on the $\sigma$ value. The $\sigma$ is between $[0,1]$ and $0$ means- forget the last value, $1$ means- get all (exact) the value from the last state. Sigmas for each cell are established during the training phase.