Skip to content

Instantly share code, notes, and snippets.

View tigerneil's full-sized avatar
🎯
Focusing

Xiaohu Zhu tigerneil

🎯
Focusing
View GitHub Profile
"""
This is a batched LSTM forward and backward pass
"""
import numpy as np
import code
class LSTM:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):
@tigerneil
tigerneil / elasticsearch-ik-mmseg.rmd
Last active August 29, 2015 14:05
elasticsearch.yml for mmseg
create two directory: `/config/mmseg`, `/plugins/analysis-mmseg`
1. got to [`https://github.com/medcl/elasticsearch-rtf/tree/master/config/mmseg`](https://github.com/medcl/elasticsearch-rtf/tree/master/config/mmseg)`, download the files:
chars.dic, units.dic, words-my.dic,words.dic, mv them to `/config/mmseg`
2. go to [`https://github.com/medcl/elasticsearch-rtf/tree/master/plugins/analysis-mmseg`](https://github.com/medcl/elasticsearch-rtf/tree/master/plugins/analysis-mmseg), download the jar:
elasticsearch-analysis-mmseg-1.2.2.jar, mv them to `/plugins/analysis-mmseg`
3. add the following configuration to `elasticsearch.yml`:
@tigerneil
tigerneil / elasticsearch.yml
Created August 27, 2014 10:10
elasticsearch.yam for maleskine
in elasticsearch.yml add the
```
analyzer:
ik:
alias:
- ik_analyzer
type: org.elasticsearch.index.analysis.IkAnalyzerProvider
ik_max_word:
type: ik
use_smart: false