How to use Spacy Japanese model in Google Colaboratory

The natural language processing library Spacy officially supports Japanese in 2.2.3.

»Reference: What ’s New in v2.3

So, I decided to use Spacy, which supports Japanese in Google Colab, but I stumbled a little at that time, so I will write an article with a memo.

STEP1: Raise the version of Spacy

With the following command.

!pip install --upgrade spacy

STEP2: Add Japanese dictionary:

With the following command.

!python -m spacy download ja_core_news_lg

STEP3: Restart the runtime

If you try to use Spacy as it is, an error will occur. Let's reboot gently.

STEP4: Import and use of Spacy

You should be able to use it with this! (^^)!

import spacy
print(spacy.__version__)

nlp = spacy.load('ja_core_news_lg')

Recommended Posts

How to use Spacy Japanese model in Google Colaboratory
How to use Google Colaboratory
How to use Google Test in C
How to load files in Google Drive with Google Colaboratory
How to use the model learned in Lobe in Python
How to use classes in Theano
How to use SQLite in Python
How to use Mysql in python
How to use ChemSpider in Python
How to use PubChem in Python
How to handle Japanese in Python
How to use calculated columns in CASTable
[Introduction to Python] How to use class in Python?
How to display formulas in latex when using sympy (> = 1.4) in Google Colaboratory
How to use Google Assistant on Windows 10
How to use Google Colaboratory and usage example (PyTorch x DCGAN)
How to use Japanese with NLTK plot
How to search Google Drive with Google Colaboratory
Use cartopy without bugs in Google Colaboratory
How to use Anaconda interpreter in PyCharm
How to use __slots__ in Python class
How to use regular expressions in Python
How to use is and == in Python
How to use VS Code (code server) with Google Colab in just 3 lines
How to use the C library in Python
How to use Python Image Library in python3 series
Summary of how to use MNIST in Python
How to use tkinter with python in pyenv
How to display videos inline in Google Colab
How to use xml.etree.ElementTree
How to use Python-shell
How to use tf.data
How to use virtualenv
How to use Seaboan
How to use image-match
How to use shogun
How to use Pandas 2
How to use numpy.vectorize
How to use pytest_report_header
How to use partial
How to use Bio.Phylo
How to use SymPy
How to use x-means
How to use WikiExtractor.py
How to use IPython
How to use iptables
How to use numpy
How to use TokyoTechFes2015
How to use venv
How to use dictionary {}
How to use Pyenv
How to use list []
How to use python-kabusapi
How to use OptParse
How to use return
How to use dotenv
How to use Go.mod
How to use imutils
How to use import
How to improve model metric monitoring in Amazon SageMaker
[For beginners] How to use say command in python!