-
Commandline tool for sequence labeling
-
CRF articles
-
https://createmomo.github.io/2017/09/12/CRF_Layer_on_the_Top_of_BiLSTM_1/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
from chainer import Variable | |
import chainer.functions as F | |
import chainer.links as L | |
# 入力データの準備 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
from chainer import Variable | |
import chainer.functions as F | |
import chainer.links as L | |
from chainer import cuda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright 2016 NVIDIA Corporation. All rights reserved. | |
* | |
* Please refer to the NVIDIA end user license agreement (EULA) associated | |
* with this source code for terms and conditions that govern your use of | |
* this software. Any use, reproduction, disclosure, or distribution of | |
* this software and related documentation outside the terms of the EULA | |
* is strictly prohibited. | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
logger = logging.getLogger(__name__) | |
logging.basicConfig( | |
format='%(asctime)s : %(threadName)s : %(levelname)s : %(message)s', | |
level=logging.INFO) | |
logging.info('aaaaa') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
export CUDA_HOME=$HOME/local/cuda-8.0 | |
export PATH=$HOME/local/cuda-8.0/bin:$PATH | |
export CPATH=$HOME/local/cuda-8.0/include:$CPATH | |
export LIBRARY_PATH=$HOME/local/cuda-8.0/lib64:$LIBRARY_PATH | |
export LD_LIBRARY_PATH=$HOME/local/cuda-8.0/lib64:$LD_LIBRARY_PATH | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
logger = logging.getLogger(__name__) | |
from chainer import cuda | |
def main(): | |
logging.basicConfig( | |
format='%(asctime)s : %(threadName)s : %(levelname)s : %(message)s', | |
level=logging.INFO) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
year=2016; | |
month=09; | |
for day in `seq -w 1 31` ; do for hour in `seq -w 0 23`; do curl -s https://dumps.wikimedia.org/other/pageviews/${year}/${year}-${month}/pageviews-${year}${month}${day}-${hour}0000.gz | zcat | grep "^en " | cut -d' ' -f2,3,4 > ./pageview/files/${year}-${month}-${day}-${hour}.en.txt; done; done; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import os | |
import numpy | |
import six | |
from chainer import cuda | |
from chainer.functions.activation import lstm | |
from chainer.functions.array import concat | |
from chainer.functions.array import reshape |
NewerOlder