「入門 自然言語処理」の12章を書き下ろしていただいた萩原さんのご厚意と、原著者をはじめとするNLP関連のコミュニティの皆さんのご協力により、12章の「Python による日本語自然言語処理」を下記で公開しています。 Python による日本語自然言語処理 原書では主に英語を対象とした自然言語処理を取り扱っています。内容や考え方の多くは言語に依存しないものではありますが、単語の分かち書きをしない点や統語構造等の違いから、日本語を対象とする場合、いくつか気をつけなければいけない点があります。日本語を扱う場合にも応用できるように、訳者のひとりである萩原正人さんが、日本向けに原書にはない12章を書き下ろしました。ここでは、日本語をどのように処理するかという点に加えて、さらに学ぶために、日本語の処理に関する、もしくは日本語で書かれた参考文献を幅広く紹介しています。 また、本書の訳者でもあり、12章
There are only slight differences in the two. You can use the dis module to examine this sort of thing for yourself. Edit: My first version decompiled the generator expression created at module-scope in the interactive prompt. That's slightly different from the OP's version with it used inside a function. I've modified this to match the actual case in the question. As you can see below, the "yield
March 2016: Please note the date on this post. Given the developments in the last three years, I would no longer agree with much of what I've written here. In particular, I substantially underestimated the ability of tools like six and python-future to enable single-codebase Python 2/3 support, and virtually all scientific packages now use such tools to support both. Short version: just use Python
Book: Computational Physics The materials on this page are taken from the book Computational Physics by M. Newman, an introduction to the field of computational physics using the Python programming language. If you're interested you can find information about the book here. The book itself is available from the usual booksellers or online here. The Python programming language is an excellent choic
This is the second part of the talk I gave January 24, 2013 at the Ottawa Python Authors Group. Part One introduces Python iterables and iterators and generators. This part covers the advanced use of generators while building an interactive two-player network game. Generators in Depth Generators’ ability to accept as well as produce data is useful for many purposes. The interface to generator obje
This is part one of a talk I gave January 24, 2013 at the Ottawa Python Authors Group Part Two is now also available. Both parts of this presentation are also available as a single IPython Notebook which you can download and run locally, or view with nbviewer.ipython.org. The complete source is available at https://github.com/wardi/iterables-iterators-generators A Gentle Introduction The first few
「全てのwebエンジニアがPythonを勉強するべき2013年到来」(2013-01-01)という記事が人気を集めているようだ。巳年(ヘビ年)にひっかけて、これからPythonを勉強したい人を対象に、書籍やライブラリなどを紹介している。有益な情報が多数含まれているが、ちょっとPythonを試してみたいという程度の人には、これだと敷居が高すぎるように思う。 Pythonに限らないが、あたらしい言語をはじめるとき、もっとも障害になるのは「環境構築」だろう。Pythonの場合、LinuxやMacであれば、Pythonインタプリタは最初から入っているので、Pythonそのものをインストールする必要はない。しかし、「そのあとどうするのか?」というのが、なかなかむずかしい。例えば、「Hello, World!」を出すWebアプリを書くには、そこからどうすればいいのか。なんらかのWebフレームワークを使
html.parser — Simple HTML and XHTML parser¶ Source code: Lib/html/parser.py This module defines a class HTMLParser which serves as the basis for parsing text files formatted in HTML (HyperText Mark-up Language) and XHTML. class html.parser.HTMLParser(*, convert_charrefs=True)¶ Create a parser instance able to parse invalid markup. If convert_charrefs is True (the default), all character references
Problems 1-6 André Roberge has a zip file with solutions to the first six problems, in Crunchy format: First six Problem 7: Flatten a nested list structure Based on the standard library documentation: from itertools import chain def flatten(listOfLists): return list(chain(*listOfLists))The suggested solution does not work for a list like the following: a_list = [0, 1, [2, 3], 4, 5, [6, 7]]as the a
Copyright (C) 2009, David Beazley, http://www.dabeaz.com A Curious Course on Coroutines and Concurrency David Beazley http://www.dabeaz.com Presented at PyCon'2009, Chicago, Illinois 1 Copyright (C) 2009, David Beazley, http://www.dabeaz.com This Tutorial 2 • A mondo exploration of Python coroutines mondo: 1. Extreme in degree or nature. (http://www.urbandictionary.com) 2. An instructional techniq
Command line JSON interpretation can be confusing. Python's json library (2.6+) provides a simple prettifier: $ echo '{"json":"obj"}' | python -mjson.tool { "json": "obj" } Or facetiously (from the obligatory Internet Chuck Norris Database): $ curl -s "http://api.icndb.com/jokes/random?firstName=Andrew&lastName=Martin" | python -mjson.tool { "type": "success", "value": { "categories": [ "nerdy", "
Ever had to speak to an OAuth 2.0 protected resource for debugging purposes? curl is a nice tool, but it totally lacks helpers for dealing with oauth. curlish comes for the rescue. It is able to remember access tokens for you and inject it into requests. Facebook comes preconfigured so you can start using it right away. Installation¶ Curlish is a small script written in Python without any further
PEP 393 – Flexible String Representation Author: Martin von Löwis <martin at v.loewis.de> Status: Final Type: Standards Track Created: 24-Jan-2010 Python-Version: 3.3 Post-History: Table of Contents Abstract Rationale Specification String Creation String Access New API Stable ABI GDB Debugging Hooks Deprecations, Removals, and Incompatibilities Discussion Performance Porting Guidelines References
PEP 414 – Explicit Unicode Literal for Python 3.3 Author: Armin Ronacher <armin.ronacher at active-4.com>, Alyssa Coghlan <ncoghlan at gmail.com> Status: Final Type: Standards Track Created: 15-Feb-2012 Python-Version: 3.3 Post-History: 28-Feb-2012, 04-Mar-2012 Resolution: Python-Dev message Table of Contents Abstract BDFL Pronouncement Proposal Exclusion of “Raw” Unicode Literals Author’s Note Ra
42 : デフォルトの名無しさん : 2011/11/12(土) 23:53:51.20Pythonの方が弄れる対象が多いのに、なんでウェブ系だとPHPの方が流行ってんだろ 端末からのテキスト処理も楽だし、数値計算周りのライブラリも充実しているのに PHPが優遇されているのって歴史的な経緯以外に何か他の理由でもあるのか? けどまぁ、情弱な文系SEが大半を占めているバカだらけの日本じゃ別にPHPで困ることもないか 45 : デフォルトの名無しさん : 2011/11/13(日) 01:41:24.25数値計算や端末からのテキスト処理なんてWeb系じゃ大して使わないからなあ… 43 : デフォルトの名無しさん : 2011/11/13(日) 00:04:23.30PHPが未だに現役なのは、単に歴史的な経緯でしかないだろ Pythonに関しては、ZopeさえコケていなければWebサーバ用LLとし
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く