+++ textlint = "" title = "『語学学習支援のための言語処理』を読みました。" date = "2017-11-22" slug = "bookreview-nlp-for-language-learning" tags = ["book", "nlp", "review"] categories = ["Research", "Book"] aliases = ["/bookreview-nlp-for-language-learning/"] draft = true +++
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
from torchtext.vocab import Vectors | |
class JaFastText(Vectors): | |
def __init__(self, name=None, **kwargs): | |
super(JaFastText, self).__init__(name, url=None, **kwargs) | |
fasttext = JaFastText(name='model.vec') |
This file contains hidden or 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
{ | |
"rules": { | |
"max-comma": { | |
"max": 3 | |
}, | |
"sentence-length": { | |
"max": 90 | |
}, | |
"no-mix-dearu-desumasu": { | |
"preferInHeader": "", |
This file contains hidden or 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
ARG cuda_version=8.0 | |
ARG cudnn_version=6 | |
ARG distribution=ubuntu16.04 | |
FROM nvidia/cuda:${cuda_version}-cudnn${cudnn_version}-devel-${distribution} | |
RUN apt-get update && apt-get install -y \ | |
wget \ | |
git \ | |
libhdf5-dev \ | |
g++ \ |
This file contains hidden or 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
ARG cuda_version=9.0 | |
ARG cudnn_version=7 | |
ARG distribution=ubuntu16.04 | |
FROM nvidia/cuda:${cuda_version}-cudnn${cudnn_version}-devel-${distribution} | |
RUN apt-get update && apt-get install -y \ | |
wget \ | |
git \ | |
libhdf5-dev \ | |
g++ \ |
- In IntelliJ IDEA/PyCharm, debugger won't work in the package named "code".
- Better not to name source-root directory "code".
When code dir is a package (see ng.png below), you'll get following error when starting debug tool shown in the image (ng-log.png).
Remove __init__.py
from code
dir (ok.png).
This file contains hidden or 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
[[source]] | |
name = "pypi" | |
verify_ssl = true | |
url = "https://pypi.python.org/simple" | |
[dev-packages] | |
yapf = "*" | |
pytest = "*" | |
bpython = "*" |
This file contains hidden or 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
# Base Image | |
ARG CUDA_VER=9.0 | |
ARG CUDNN_VER=7 | |
ARG DISTRIBUTION=ubuntu16.04 | |
FROM nvidia/cuda:${CUDA_VER}-cudnn${CUDNN_VER}-devel-${DISTRIBUTION} | |
# System | |
RUN apt-get update && \ | |
apt-get install -y \ | |
build-essential \ |
This file contains hidden or 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
# QRNN for TensorFlow 1.4 | |
# This is a fork of QRNN implementation in https://github.com/DingKe/nn_playground (MIT Licenced) | |
import numpy as np | |
import tensorflow as tf | |
from tensorflow.python.keras import backend as K | |
from tensorflow.python.keras import activations, initializers, regularizers, constraints | |
from tensorflow.python.keras.layers import Layer, InputSpec | |
# Paste directly from latest keras source since this is not available in TF 1.4.1. |