CINXE.COM
LuceneのHighlighterを使ってみる - CLOVER🍀
<!DOCTYPE html> <html lang="ja" data-admin-domain="//blog.hatena.ne.jp" data-admin-origin="https://blog.hatena.ne.jp" data-author="Kazuhira" data-avail-langs="ja en" data-blog="kazuhira-r.hatenablog.com" data-blog-host="kazuhira-r.hatenablog.com" data-blog-is-public="1" data-blog-name="CLOVER🍀" data-blog-owner="Kazuhira" data-blog-show-ads="1" data-blog-show-sleeping-ads="" data-blog-uri="https://kazuhira-r.hatenablog.com/" data-blog-uuid="10257846132617921657" data-blogs-uri-base="https://kazuhira-r.hatenablog.com" data-brand="hatenablog" data-data-layer="{"hatenablog":{"admin":{},"analytics":{"brand_property_id":"","measurement_id":"G-VZ4P54MK8T","non_sampling_property_id":"","property_id":"","separated_property_id":"UA-29716941-26"},"blog":{"blog_id":"10257846132617921657","content_seems_japanese":"true","disable_ads":"","enable_ads":"true","enable_keyword_link":"true","entry_show_footer_related_entries":"true","force_pc_view":"false","is_public":"true","is_responsive_view":"false","is_sleeping":"false","lang":"ja","name":"CLOVER\ud83c\udf40","owner_name":"Kazuhira","uri":"https://kazuhira-r.hatenablog.com/"},"brand":"hatenablog","page_id":"entry","permalink_entry":{"author_name":"Kazuhira","categories":"Lucene","character_count":7654,"date":"2013-10-01","entry_id":"10257846132620583106","first_category":"Lucene","hour":"22","title":"Lucene\u306eHighlighter\u3092\u4f7f\u3063\u3066\u307f\u308b","uri":"https://kazuhira-r.hatenablog.com/entry/20131001/1380635740"},"pro":"free","router_type":"blogs"}}" data-device="pc" data-dont-recommend-pro="false" data-global-domain="https://hatena.blog" data-globalheader-color="b" data-globalheader-type="pc" data-has-touch-view="1" data-help-url="https://help.hatenablog.com" data-page="entry" data-parts-domain="https://hatenablog-parts.com" data-plus-available="" data-pro="false" data-router-type="blogs" data-sentry-dsn="https://03a33e4781a24cf2885099fed222b56d@sentry.io/1195218" data-sentry-environment="production" data-sentry-sample-rate="0.1" data-static-domain="https://cdn.blog.st-hatena.com" data-version="d3133fa23ac59bde76d93e1a904534" data-initial-state="{}" > <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#"> <meta name="robots" content="max-image-preview:large" /> <meta charset="utf-8"/> <meta http-equiv="X-UA-Compatible" content="IE=7; IE=9; IE=10; IE=11" /> <title>LuceneのHighlighterを使ってみる - CLOVER🍀</title> <link rel="canonical" href="https://kazuhira-r.hatenablog.com/entry/20131001/1380635740"/> <meta itemprop="name" content="LuceneのHighlighterを使ってみる - CLOVER🍀"/> <meta itemprop="image" content="https://ogimage.blog.st-hatena.com/10257846132617921657/10257846132620583106/1536088626"/> <meta property="og:title" content="LuceneのHighlighterを使ってみる - CLOVER🍀"/> <meta property="og:type" content="article"/> <meta property="og:url" content="https://kazuhira-r.hatenablog.com/entry/20131001/1380635740"/> <meta property="og:image" content="https://ogimage.blog.st-hatena.com/10257846132617921657/10257846132620583106/1536088626"/> <meta property="og:image:alt" content="LuceneのHighlighterを使ってみる - CLOVER🍀"/> <meta property="og:description" content="Luceneに搭載されている、Highlighterを使ってみます。Highlighter http://lucene.apache.org/core/4_4_0/highlighter/index.html今回は、先に利用したコードから。とりあえず、Document、インデックスは作成済みのものとします。Queryも作成してIndexSearcherに対して検索も実行済みとします。まずは、SimpleHTMLFormatterのインスタンスを用意します。最終的にハイライトを行うのは、この上位にあるFormatterインターフェースを実装したクラスで決まるようです。 val htmlForma…" /> <meta property="og:site_name" content="CLOVER🍀"/> <meta property="article:published_time" content="1380635740" /> <meta property="article:tag" content="Lucene" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:image" content="https://ogimage.blog.st-hatena.com/10257846132617921657/10257846132620583106/1536088626" /> <meta name="twitter:title" content="LuceneのHighlighterを使ってみる - CLOVER🍀" /> <meta name="twitter:description" content="Luceneに搭載されている、Highlighterを使ってみます。Highlighter http://lucene.apache.org/core/4_4_0/highlighter/index.html今回は、先に利用したコードから。とりあえず、Document、インデックスは作成済みのものとします。Queryも…" /> <meta name="twitter:app:name:iphone" content="はてなブログアプリ" /> <meta name="twitter:app:id:iphone" content="583299321" /> <meta name="twitter:app:url:iphone" content="hatenablog:///open?uri=https%3A%2F%2Fkazuhira-r.hatenablog.com%2Fentry%2F20131001%2F1380635740" /> <meta name="twitter:site" content="@kazuhira_r" /> <meta name="description" content="Luceneに搭載されている、Highlighterを使ってみます。Highlighter http://lucene.apache.org/core/4_4_0/highlighter/index.html今回は、先に利用したコードから。とりあえず、Document、インデックスは作成済みのものとします。Queryも作成してIndexSearcherに対して検索も実行済みとします。まずは、SimpleHTMLFormatterのインスタンスを用意します。最終的にハイライトを行うのは、この上位にあるFormatterインターフェースを実装したクラスで決まるようです。 val htmlForma…" /> <script id="embed-gtm-data-layer-loader" data-data-layer-page-specific="{"hatenablog":{"blogs_permalink":{"entry_afc_issued":"false","blog_afc_issued":"false","has_related_entries_with_elasticsearch":"true","is_blog_sleeping":"false","is_author_pro":"false"}}}" > (function() { function loadDataLayer(elem, attrName) { if (!elem) { return {}; } var json = elem.getAttribute(attrName); if (!json) { return {}; } return JSON.parse(json); } var globalVariables = loadDataLayer( document.documentElement, 'data-data-layer' ); var pageSpecificVariables = loadDataLayer( document.getElementById('embed-gtm-data-layer-loader'), 'data-data-layer-page-specific' ); var variables = [globalVariables, pageSpecificVariables]; if (!window.dataLayer) { window.dataLayer = []; } for (var i = 0; i < variables.length; i++) { window.dataLayer.push(variables[i]); } })(); </script> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-P4CXTW');</script> <!-- End Google Tag Manager --> <link rel="shortcut icon" href="https://kazuhira-r.hatenablog.com/icon/favicon"> <link rel="apple-touch-icon" href="https://kazuhira-r.hatenablog.com/icon/touch"> <link rel="icon" sizes="192x192" href="https://kazuhira-r.hatenablog.com/icon/link"> <link rel="alternate" type="application/atom+xml" title="Atom" href="https://kazuhira-r.hatenablog.com/feed"/> <link rel="alternate" type="application/rss+xml" title="RSS2.0" href="https://kazuhira-r.hatenablog.com/rss"/> <link rel="alternate" type="application/json+oembed" href="https://hatena.blog/oembed?url=https%3A%2F%2Fkazuhira-r.hatenablog.com%2Fentry%2F20131001%2F1380635740&format=json" title="oEmbed Profile of LuceneのHighlighterを使ってみる"/> <link rel="alternate" type="text/xml+oembed" href="https://hatena.blog/oembed?url=https%3A%2F%2Fkazuhira-r.hatenablog.com%2Fentry%2F20131001%2F1380635740&format=xml" title="oEmbed Profile of LuceneのHighlighterを使ってみる"/> <link rel="author" href="http://www.hatena.ne.jp/Kazuhira/"> <link rel="stylesheet" type="text/css" href="https://cdn.blog.st-hatena.com/css/blog.css?version=d3133fa23ac59bde76d93e1a904534"/> <link rel="stylesheet" type="text/css" href="https://usercss.blog.st-hatena.com/blog_style/10257846132617921657/26bf9c7bded2504665f410e7c4ea31e4ffd6f9b6"/> <script> </script> <style> div#google_afc_user, div.google-afc-user-container, div.google_afc_image, div.google_afc_blocklink { display: block !important; } </style> <script src="https://cdn.pool.st-hatena.com/valve/valve.js" async></script> <script id="test-valve-definition"> var valve = window.valve || []; valve.push(function(v) { v.config({ service: 'blog', content: { result: 'adtrust', documentIds: ["blog:entry:10257846132620583106"] } }); v.defineDFPSlot({"lazy":1,"sizes":{"mappings":[[[320,568],[[336,280],[300,250],"fluid"]],[[0,0],[[300,250]]]]},"slotId":"ad-in-entry","unit":"/4374287/blog_pc_entry_sleep_in-article"}); v.defineDFPSlot({"lazy":"","sizes":[[300,250],[336,280],[468,60],"fluid"],"slotId":"google_afc_user_container_0","unit":"/4374287/blog_user"}); v.sealDFPSlots(); }); </script> <script type="application/ld+json">{"@context":"http://schema.org","@type":"Article","dateModified":"2018-09-05T04:17:06+09:00","datePublished":"2013-10-01T22:55:40+09:00","headline":"LuceneのHighlighterを使ってみる","image":["https://cdn.blog.st-hatena.com/images/theme/og-image-1500.png"]}</script> <script type="module"> import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11.2.1/dist/mermaid.esm.min.mjs'; mermaid.initialize({ startOnLoad: true }); </script> </head> <body class="page-entry category-Lucene globalheader-ng-enabled"> <div id="globalheader-container" data-brand="hatenablog" > <iframe id="globalheader" height="37" frameborder="0" allowTransparency="true"></iframe> </div> <nav class=" blog-controlls "> <div class="blog-controlls-blog-icon"> <a href="https://kazuhira-r.hatenablog.com/"> <img src="https://cdn.blog.st-hatena.com/images/admin/blog-icon-noimage.png" alt="CLOVER🍀"/> </a> </div> <div class="blog-controlls-title"> <a href="https://kazuhira-r.hatenablog.com/">CLOVER🍀</a> </div> <a href="https://blog.hatena.ne.jp/Kazuhira/kazuhira-r.hatenablog.com/subscribe?utm_campaign=subscribe_blog&utm_source=blogs_topright_button&utm_medium=button" class="blog-controlls-subscribe-btn test-blog-header-controlls-subscribe"> 読者になる </a> </nav> <div id="container"> <div id="container-inner"> <header id="blog-title" data-brand="hatenablog"> <div id="blog-title-inner" > <div id="blog-title-content"> <h1 id="title"><a href="https://kazuhira-r.hatenablog.com/">CLOVER🍀</a></h1> <h2 id="blog-description">That was when it all began.</h2> </div> </div> </header> <div id="content" class="hfeed" > <div id="content-inner"> <div id="wrapper"> <div id="main"> <div id="main-inner"> <!-- google_ad_section_start --> <!-- rakuten_ad_target_begin --> <article class="entry hentry test-hentry js-entry-article date-first autopagerize_page_element chars-8000 words-600 mode-hatena entry-odd" id="entry-10257846132620583106" data-keyword-campaign="" data-uuid="10257846132620583106" data-publication-type="entry"> <div class="entry-inner"> <header class="entry-header"> <div class="date entry-date first"> <a href="https://kazuhira-r.hatenablog.com/archive/2013/10/01" rel="nofollow"> <time datetime="2013-10-01T13:55:40Z" title="2013-10-01T13:55:40Z"> <span class="date-year">2013</span><span class="hyphen">-</span><span class="date-month">10</span><span class="hyphen">-</span><span class="date-day">01</span> </time> </a> </div> <h1 class="entry-title"> <a href="https://kazuhira-r.hatenablog.com/entry/20131001/1380635740" class="entry-title-link bookmark">LuceneのHighlighterを使ってみる</a> </h1> <div class="entry-categories categories"> <a href="https://kazuhira-r.hatenablog.com/archive/category/Lucene" class="entry-category-link category-Lucene">Lucene</a> </div> </header> <div class="entry-content hatenablog-entry"> <p><a class="keyword" href="http://d.hatena.ne.jp/keyword/Lucene">Lucene</a>に搭載されている、Highlighterを使ってみます。</p><p>Highlighter<br /> <a href="http://lucene.apache.org/core/4_4_0/highlighter/index.html">http://lucene.apache.org/core/4_4_0/highlighter/index.html</a></p><p>今回は、先に利用したコードから。</p><p>とりあえず、Document、インデックスは作成済みのものとします。Queryも作成してIndexSearcherに対して検索も実行済みとします。</p><p>まずは、SimpleHTMLFormatterの<a class="keyword" href="http://d.hatena.ne.jp/keyword/%A5%A4%A5%F3%A5%B9%A5%BF%A5%F3%A5%B9">インスタンス</a>を用意します。最終的にハイライトを行うのは、この上位にあるFormatterインターフェースを実装したクラスで決まるようです。</p> <pre class="code lang-scala" data-lang="scala" data-unlink><span class="synType">val</span> htmlFormatter = <span class="synStatement">new</span> SimpleHTMLFormatter() <span class="synComment">// 何もしていないと、<b></b>で囲まれる</span> <span class="synComment">// val htmlFormatter = new SimpleHTMLFormatter("<bold>", "</bold>") // コンストラクタで指定可能</span> </pre><p>ここでは、HTMLを使うSimpleHTMLFormatterクラスを使用します。デフォルトではbタグで囲まれますが、コンスト<a class="keyword" href="http://d.hatena.ne.jp/keyword/%A5%E9%A5%AF">ラク</a>タで明示的に指定することも可能です。</p><p>続いて、Highlighterの<a class="keyword" href="http://d.hatena.ne.jp/keyword/%A5%A4%A5%F3%A5%B9%A5%BF%A5%F3%A5%B9">インスタンス</a>を作成します。この時、Formatterの<a class="keyword" href="http://d.hatena.ne.jp/keyword/%A5%A4%A5%F3%A5%B9%A5%BF%A5%F3%A5%B9">インスタンス</a>と検索に使用したQueryをコンスト<a class="keyword" href="http://d.hatena.ne.jp/keyword/%A5%E9%A5%AF">ラク</a>タ引数に使用します。Queryは、QueryScorerでラップしますが。</p> <pre class="code lang-scala" data-lang="scala" data-unlink><span class="synType">val</span> highlighter = <span class="synStatement">new</span> Highlighter(htmlFormatter, <span class="synStatement">new</span> QueryScorer(query)) </pre><p>検索結果から取得できるScoreDocsの配列を使用して、通常通りIndexSearcherからDocumentを取得します。</p> <pre class="code lang-scala" data-lang="scala" data-unlink><span class="synStatement">for</span> (h <- hits) { <span class="synComment">// hitsはScoreDocの配列</span> <span class="synType">val</span> hitDoc = searcher.doc(h.doc) </pre><p>ここでは、ハイライト対象のフィールド名(String)がfield変数に入っていると仮定し、Documentからテキストを取得します。</p> <pre class="code lang-scala" data-lang="scala" data-unlink> <span class="synComment">// Highlighter</span> <span class="synType">val</span> text = hitDoc.get(field) <span class="synComment">// ハイライト対象のフィールドをDocumentから取得</span> </pre><p>TokenSources#getAnyTokenStreamから、IndexReader、DocumentのID、フィールド名、Analyzerを渡してTokenStreamを取得します。</p> <pre class="code lang-scala" data-lang="scala" data-unlink> <span class="synType">val</span> tokenStream = TokenSources.getAnyTokenStream(searcher.getIndexReader, h.doc, field, analyzer) </pre><p>先ほど作成したHighlighterのgetBestTextFragmentsメソッドを呼び出し、TextFragmentの配列を取得します。</p> <pre class="code lang-scala" data-lang="scala" data-unlink> <span class="synType">val</span> fragments = highlighter.getBestTextFragments(tokenStream, text, mergeContiguousFragments, maxNumFragments) </pre><p>ここで、第3、第4引数には</p> <pre class="code lang-scala" data-lang="scala" data-unlink> <span class="synType">val</span> mergeContiguousFragments = <span class="synConstant">false</span> <span class="synType">val</span> maxNumFragments = <span class="synConstant">10</span> </pre><p>を指定しています。</p><p>また、TextFragmentの配列ではなく、StringやString配列を受け取ることができるメソッドもあるようです。</p><p>最終的なハイライトされた値は、この取得したTextFragmentのうち、getScoreの戻り値が0より大きなものを拾えばよいみたいです。</p> <pre class="code lang-scala" data-lang="scala" data-unlink> fragments .withFilter(_.getScore > <span class="synConstant">0</span>) .foreach(f => println(s<span class="synConstant">" Fragment => $f"</span>)) </pre><p>実行例ですが、例えば「<a class="keyword" href="http://d.hatena.ne.jp/keyword/lucene">lucene</a>」と入力して、「<a class="keyword" href="http://d.hatena.ne.jp/keyword/lucene">lucene</a>」を含んだフィールドに対して摘要すると、</p> <pre class="code" data-lang="" data-unlink> Fragment => Apache <bold>Lucene</bold> 入門 〜Java・オープンソース・全文検索システムの構築 Fragment => <bold>Lucene</bold>は全文検索システムを構築するためのJavaのライブラリです。</pre><p>のようにハイライトされます。</p><p>サンプル自体は、</p><p><a href="http://lucene.apache.org/core/4_4_0/highlighter/org/apache/lucene/search/highlight/package-summary.html">http://lucene.apache.org/core/4_4_0/highlighter/org/apache/lucene/search/highlight/package-summary.html</a></p><p>に載っているのであんまり迷わないのですが、一緒に載っているTerm <a class="keyword" href="http://d.hatena.ne.jp/keyword/Vector">Vector</a>が何で強調されているのかがわかりませんでした。Term <a class="keyword" href="http://d.hatena.ne.jp/keyword/Vector">Vector</a>、見てみた方がいいのかな?</p><p>それでは、今回作成したコードです。</p><p>build.sbt</p> <pre class="code lang-scala" data-lang="scala" data-unlink>name := <span class="synConstant">"lucene-highlighter"</span> version := <span class="synConstant">"0.0.1-SNAPSHOT"</span> scalaVersion := <span class="synConstant">"2.10.3"</span> organization := <span class="synConstant">"littlewings"</span> libraryDependencies ++= Seq( <span class="synConstant">"org.apache.lucene"</span> % <span class="synConstant">"lucene-analyzers-kuromoji"</span> % <span class="synConstant">"4.4.0"</span>, <span class="synConstant">"org.apache.lucene"</span> % <span class="synConstant">"lucene-queryparser"</span> % <span class="synConstant">"4.4.0"</span>, <span class="synConstant">"org.apache.lucene"</span> % <span class="synConstant">"lucene-highlighter"</span> % <span class="synConstant">"4.4.0"</span> ) </pre><p>src/main/<a class="keyword" href="http://d.hatena.ne.jp/keyword/scala">scala</a>/LuceneHighlighter.<a class="keyword" href="http://d.hatena.ne.jp/keyword/scala">scala</a></p> <pre class="code lang-scala" data-lang="scala" data-unlink><span class="synPreProc">import</span> scala.collection.JavaConverters._ <span class="synPreProc">import</span> scala.util.{Failure, Success, Try} <span class="synPreProc">import</span> org.apache.lucene.analysis.Analyzer <span class="synPreProc">import</span> org.apache.lucene.analysis.ja.JapaneseAnalyzer <span class="synPreProc">import</span> org.apache.lucene.document.{Document, Field, TextField, StringField} <span class="synPreProc">import</span> org.apache.lucene.index.{DirectoryReader, IndexWriter, IndexWriterConfig} <span class="synPreProc">import</span> org.apache.lucene.queryparser.classic.QueryParser <span class="synPreProc">import</span> org.apache.lucene.search.{IndexSearcher, Query, Sort, SortField} <span class="synPreProc">import</span> org.apache.lucene.search.{ScoreDoc, TopFieldCollector, TotalHitCountCollector} <span class="synPreProc">import</span> org.apache.lucene.store.{Directory, RAMDirectory} <span class="synPreProc">import</span> org.apache.lucene.util.Version <span class="synPreProc">import</span> org.apache.lucene.search.highlight.{Highlighter, QueryScorer, SimpleHTMLFormatter, TokenSources} <span class="synType">object</span> LuceneHighlighter { <span class="synIdentifier"> def</span> main(args: <span class="synConstant">Array</span>[<span class="synConstant">String</span>]): Unit = { <span class="synType">val</span> luceneVersion = Version.LUCENE_44 <span class="synType">val</span> analyzer = <span class="synStatement">new</span> JapaneseAnalyzer(luceneVersion) <span class="synStatement">for</span> (directory <- <span class="synStatement">new</span> RAMDirectory) { registryDocuments(directory, luceneVersion, analyzer) queryWhile(directory, luceneVersion, analyzer) } } <span class="synType">private</span><span class="synIdentifier"> def</span> registryDocuments(directory: Directory, luceneVersion: Version, analyzer: Analyzer): Unit = <span class="synStatement">for</span> (indexWriter <- <span class="synStatement">new</span> IndexWriter(directory, <span class="synStatement">new</span> IndexWriterConfig(luceneVersion, analyzer))) { indexWriter.addDocument(createBook(<span class="synConstant">"978-4894714991"</span>, <span class="synConstant">"Effective Java 第2版"</span>, <span class="synConstant">3780</span>, <span class="synConstant">"java"</span>, <span class="synConstant">"Javaプログラミング書籍の定本「Effective Java」の改訂版です。著者のGoogle, Sun Microsystemsにおけるソフトウェア開発で得た知識・経験をまとめた、JavaでプログラミングをするすべてのSE必読の書籍です。2001年の初版以降の追加項目、JavaSE6.0に対応。"</span>)) indexWriter.addDocument(createBook(<span class="synConstant">"978-4774139906"</span>, <span class="synConstant">"パーフェクトJava"</span>, <span class="synConstant">3780</span>, <span class="synConstant">"java"</span>, <span class="synConstant">"本書はJavaで開発を行う人へのバイブル的1冊です。Javaの基本から説明していますが、プログラミング一般の考え方や技法まで解説しています。"</span>)) indexWriter.addDocument(createBook(<span class="synConstant">"978-4774158785"</span>, <span class="synConstant">"AndroidエンジニアのためのモダンJava"</span>, <span class="synConstant">3360</span>, <span class="synConstant">"java"</span>, <span class="synConstant">"本書は、複雑かつ高度なAndroidアプリケーションの開発に必要となる、Java言語の基礎を理解することに主眼を置いて執筆されています。"</span>)) indexWriter.addDocument(createBook(<span class="synConstant">"978-4844330844"</span>, <span class="synConstant">"Scalaスケーラブルプログラミング第2版"</span>, <span class="synConstant">4830</span>, <span class="synConstant">"scala"</span>, <span class="synConstant">"言語設計者自ら、その手法と思想を説くScalaプログラミングバイブル!"</span>)) indexWriter.addDocument(createBook(<span class="synConstant">"978-4798125411"</span>, <span class="synConstant">"Scala逆引きレシピ (PROGRAMMER’S RECiPE)"</span>, <span class="synConstant">3360</span>, <span class="synConstant">"scala"</span>, <span class="synConstant">"Scalaでコードを書く際の実践ノウハウが凝縮!"</span>)) indexWriter.addDocument(createBook(<span class="synConstant">"978-4774127804"</span>, <span class="synConstant">"Apache Lucene 入門 〜Java・オープンソース・全文検索システムの構築"</span>, <span class="synConstant">3360</span>, <span class="synConstant">"lucene"</span>, <span class="synConstant">"Luceneは全文検索システムを構築するためのJavaのライブラリです。"</span>)) indexWriter.addDocument(createBook(<span class="synConstant">"978-4774141756"</span>, <span class="synConstant">"Apache Solr入門 ―オープンソース全文検索エンジン"</span>, <span class="synConstant">3780</span>, <span class="synConstant">"solr"</span>, <span class="synConstant">"Apache Solrとは,オープンソースの検索エンジンです.Apache LuceneというJavaの全文検索システムをベースに豊富な拡張性をもたせ,多くの開発者が利用できるように作られました."</span>)) } <span class="synType">private</span><span class="synIdentifier"> def</span> createBook(isbn13: <span class="synConstant">String</span>, title: <span class="synConstant">String</span>, price: Int, category: <span class="synConstant">String</span>, abstraction: <span class="synConstant">String</span>): Document = { <span class="synType">val</span> document = <span class="synStatement">new</span> Document document.add(<span class="synStatement">new</span> StringField(<span class="synConstant">"isbn13"</span>, isbn13, Field.Store.YES)) document.add(<span class="synStatement">new</span> TextField(<span class="synConstant">"title"</span>, title, Field.Store.YES)) document.add(<span class="synStatement">new</span> StringField(<span class="synConstant">"price"</span>, price.toString, Field.Store.YES)) document.add(<span class="synStatement">new</span> StringField(<span class="synConstant">"category"</span>, category, Field.Store.YES)) document.add(<span class="synStatement">new</span> TextField(<span class="synConstant">"abstraction"</span>, abstraction, Field.Store.YES)) document } <span class="synType">private</span><span class="synIdentifier"> def</span> queryWhile(directory: Directory, luceneVersion: Version, analyzer: Analyzer): Unit = <span class="synStatement">for</span> (reader <- DirectoryReader.open(directory)) { <span class="synType">val</span> searcher = <span class="synStatement">new</span> IndexSearcher(reader) <span class="synType">val</span> queryParser = <span class="synStatement">new</span> QueryParser(luceneVersion, <span class="synConstant">"title"</span>, analyzer) <span class="synType">val</span> limit = <span class="synConstant">1000</span> <span class="synIdentifier"> def</span> parseQuery(line: <span class="synConstant">String</span>): Try[Query] = Try(queryParser.parse(line)) <span class="synIdentifier"> def</span> search(query: Query): (Query, Int, <span class="synConstant">Array</span>[ScoreDoc]) = { println(s<span class="synConstant">"Query => [$query]"</span>) <span class="synType">val</span> totalHitCountCollector = <span class="synStatement">new</span> TotalHitCountCollector searcher.search(query, totalHitCountCollector) <span class="synType">val</span> totalHits = totalHitCountCollector.getTotalHits <span class="synType">val</span> docCollector = TopFieldCollector.create(<span class="synStatement">new</span> Sort(<span class="synStatement">new</span> SortField(<span class="synConstant">"price"</span>, SortField.Type.STRING)), limit, <span class="synConstant">true</span>, <span class="synConstant">false</span>, <span class="synConstant">false</span>, <span class="synConstant">false</span>) searcher.search(query, docCollector) (query, totalHits, docCollector.topDocs.scoreDocs) } Iterator .continually(readLine(<span class="synConstant">"Lucene Query> "</span>)) .withFilter(l => l != <span class="synConstant">null</span> && !l.isEmpty) .takeWhile(l => l != <span class="synConstant">"exit"</span>) .map(parseQuery) .withFilter(q => q.recoverWith { <span class="synType">case</span> e => println(s<span class="synConstant">"Invalid Query => $e"</span>) Failure(e) }.isSuccess) .map(s => search(s.get)) .foreach { <span class="synType">case</span> (query, n, hits) => <span class="synStatement">if</span> (n > <span class="synConstant">0</span>) { println(s<span class="synConstant">"$n 件ヒットしました"</span>) <span class="synType">val</span> fields = <span class="synConstant">Array</span>(<span class="synConstant">"title"</span>, <span class="synConstant">"abstraction"</span>) <span class="synType">val</span> htmlFormatter = <span class="synStatement">new</span> SimpleHTMLFormatter() <span class="synComment">// 何もしていないと、<b></b>で囲まれる</span> <span class="synComment">// val htmlFormatter = new SimpleHTMLFormatter("<bold>", "</bold>") // コンストラクタで指定可能</span> <span class="synType">val</span> highlighter = <span class="synStatement">new</span> Highlighter(htmlFormatter, <span class="synStatement">new</span> QueryScorer(query)) <span class="synType">val</span> mergeContiguousFragments = <span class="synConstant">false</span> <span class="synType">val</span> maxNumFragments = <span class="synConstant">10</span> <span class="synStatement">for</span> (h <- hits) { <span class="synType">val</span> hitDoc = searcher.doc(h.doc) println(s<span class="synConstant">"Score,ID[${h.score}:${h.doc}] : Doc => "</span> + hitDoc .getFields .asScala .map(_.stringValue) .mkString(<span class="synConstant">" "</span>, <span class="synConstant">" | "</span>, <span class="synConstant">""</span>)) <span class="synComment">// Highlighter</span> fields.foreach { field => <span class="synType">val</span> text = hitDoc.get(field) <span class="synComment">// ハイライト対象のフィールドをDocumentから取得</span> <span class="synType">val</span> tokenStream = TokenSources.getAnyTokenStream(searcher.getIndexReader, h.doc, field, analyzer) <span class="synType">val</span> fragments = highlighter.getBestTextFragments(tokenStream, text, mergeContiguousFragments, maxNumFragments) fragments .withFilter(_.getScore > <span class="synConstant">0</span>) .foreach(f => println(s<span class="synConstant">" Fragment => $f"</span>)) } } } <span class="synStatement">else</span> { println(<span class="synConstant">"お探しの本はありませんでした"</span>) } } } implicit <span class="synType">class</span> AutoCloseableWrapper[A <: AutoCloseable](<span class="synType">val</span> underlying: A) <span class="synType">extends</span> AnyVal { <span class="synIdentifier"> def</span> foreach(fun: A => Unit): Unit = <span class="synStatement">try</span> { fun(underlying) } <span class="synStatement">finally</span> { underlying.close() } } } </pre> </div> <footer class="entry-footer"> <div class="entry-tags-wrapper"> <div class="entry-tags"> </div> </div> <p class="entry-footer-section track-inview-by-gtm" data-gtm-track-json="{"area": "finish_reading"}"> <span class="author vcard"><span class="fn" data-load-nickname="1" data-user-name="Kazuhira" >Kazuhira</span></span> <span class="entry-footer-time"><a href="https://kazuhira-r.hatenablog.com/entry/20131001/1380635740"><time data-relative datetime="2013-10-01T13:55:40Z" title="2013-10-01T13:55:40Z" class="updated">2013-10-01 22:55</time></a></span> <span class=" entry-footer-subscribe " data-test-blog-controlls-subscribe> <a href="https://blog.hatena.ne.jp/Kazuhira/kazuhira-r.hatenablog.com/subscribe?utm_medium=button&utm_source=blogs_entry_footer&utm_campaign=subscribe_blog"> 読者になる </a> </span> </p> <div class="hatena-star-container" data-hatena-star-container data-hatena-star-url="https://kazuhira-r.hatenablog.com/entry/20131001/1380635740" data-hatena-star-title="LuceneのHighlighterを使ってみる" data-hatena-star-variant="profile-icon" data-hatena-star-profile-url-template="https://blog.hatena.ne.jp/{username}/" ></div> <div class="social-buttons"> <div class="social-button-item"> <a href="https://b.hatena.ne.jp/entry/s/kazuhira-r.hatenablog.com/entry/20131001/1380635740" class="hatena-bookmark-button" data-hatena-bookmark-url="https://kazuhira-r.hatenablog.com/entry/20131001/1380635740" data-hatena-bookmark-layout="vertical-balloon" data-hatena-bookmark-lang="ja" title="この記事をはてなブックマークに追加"><img src="https://b.st-hatena.com/images/entry-button/button-only.gif" alt="この記事をはてなブックマークに追加" width="20" height="20" style="border: none;" /></a> </div> <div class="social-button-item"> <div class="fb-share-button" data-layout="box_count" data-href="https://kazuhira-r.hatenablog.com/entry/20131001/1380635740"></div> </div> <div class="social-button-item"> <a class="entry-share-button entry-share-button-twitter test-share-button-twitter" href="https://x.com/intent/tweet?text=Lucene%E3%81%AEHighlighter%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%A6%E3%81%BF%E3%82%8B+-+CLOVER%F0%9F%8D%80&url=https%3A%2F%2Fkazuhira-r.hatenablog.com%2Fentry%2F20131001%2F1380635740" title="X(Twitter)で投稿する" ></a> </div> </div> <div class="google-afc-image test-google-rectangle-ads"> <div id="google_afc_user_container_0" class="google-afc-user-container google_afc_blocklink2_5 google_afc_boder" data-test-unit="/4374287/blog_user"></div> <a href="http://blog.hatena.ne.jp/guide/pro" class="open-pro-modal" data-guide-pro-modal-ad-url="https://hatena.blog/guide/pro/modal/ad">広告を非表示にする</a> </div> <div class="customized-footer"> <div class="entry-footer-modules" id="entry-footer-secondary-modules"> <div class="hatena-module hatena-module-related-entries" > <!-- Hatena-Epic-has-related-entries-with-elasticsearch:true --> <div class="hatena-module-title"> 関連記事 </div> <div class="hatena-module-body"> <ul class="related-entries hatena-urllist urllist-with-thumbnails"> <li class="urllist-item related-entries-item"> <div class="urllist-item-inner related-entries-item-inner"> <div class="urllist-date-link related-entries-date-link"> <a href="https://kazuhira-r.hatenablog.com/archive/2017/05/03" rel="nofollow"> <time datetime="2017-05-03T14:22:00Z" title="2017年5月3日"> 2017-05-03 </time> </a> </div> <a href="https://kazuhira-r.hatenablog.com/entry/20170503/1493821320" class="urllist-title-link related-entries-title-link urllist-title related-entries-title">Apache LuceneのFlexible Query Parserを試す</a> <div class="urllist-entry-body related-entries-entry-body">Apache Luceneでちょっと気になっていた機能として、Flexible Q…</div> </div> </li> <li class="urllist-item related-entries-item"> <div class="urllist-item-inner related-entries-item-inner"> <div class="urllist-date-link related-entries-date-link"> <a href="https://kazuhira-r.hatenablog.com/archive/2015/04/15" rel="nofollow"> <time datetime="2015-04-15T13:36:01Z" title="2015年4月15日"> 2015-04-15 </time> </a> </div> <a href="https://kazuhira-r.hatenablog.com/entry/20150415/1429104961" class="urllist-title-link related-entries-title-link urllist-title related-entries-title">InfinispanのLucene Directory実装を使って、インデックスを分散して持つ</a> <div class="urllist-entry-body related-entries-entry-body">久々に、書いてみたくなっただけのエントリ。Infinispanが持つL…</div> </div> </li> <li class="urllist-item related-entries-item"> <div class="urllist-item-inner related-entries-item-inner"> <div class="urllist-date-link related-entries-date-link"> <a href="https://kazuhira-r.hatenablog.com/archive/2014/04/12" rel="nofollow"> <time datetime="2014-04-11T16:10:47Z" title="2014年4月12日"> 2014-04-12 </time> </a> </div> <a href="https://kazuhira-r.hatenablog.com/entry/20140412/1397319047" class="urllist-title-link related-entries-title-link urllist-title related-entries-title">Luceneで、同じ名前のフィールドを複数登録してみる</a> <div class="urllist-entry-body related-entries-entry-body">SolrとかElasticsearchを見ていて、multi-valuedなフィールドを…</div> </div> </li> <li class="urllist-item related-entries-item"> <div class="urllist-item-inner related-entries-item-inner"> <a class="urllist-image-link related-entries-image-link" href="https://kazuhira-r.hatenablog.com/entry/20140411/1397240194"> <img alt="Luceneでドキュメントの更新" src="https://cdn.image.st-hatena.com/image/square/bda933dff7ee2115f949b088dc05960d7c8c4e58/backend=imagemagick;height=100;version=1;width=100/https%3A%2F%2Fimages-fe.ssl-images-amazon.com%2Fimages%2FI%2F510nupY-9zL._SL160_.jpg" class="urllist-image related-entries-image" title="Luceneでドキュメントの更新" width="100" height="100" loading="lazy"> </a> <div class="urllist-date-link related-entries-date-link"> <a href="https://kazuhira-r.hatenablog.com/archive/2014/04/11" rel="nofollow"> <time datetime="2014-04-10T18:16:34Z" title="2014年4月11日"> 2014-04-11 </time> </a> </div> <a href="https://kazuhira-r.hatenablog.com/entry/20140411/1397240194" class="urllist-title-link related-entries-title-link urllist-title related-entries-title">Luceneでドキュメントの更新</a> <div class="urllist-entry-body related-entries-entry-body">最近、Elasticsearchの本を読みまして。高速スケーラブル検索エ…</div> </div> </li> <li class="urllist-item related-entries-item"> <div class="urllist-item-inner related-entries-item-inner"> <div class="urllist-date-link related-entries-date-link"> <a href="https://kazuhira-r.hatenablog.com/archive/2013/12/22" rel="nofollow"> <time datetime="2013-12-21T15:33:17Z" title="2013年12月22日"> 2013-12-22 </time> </a> </div> <a href="https://kazuhira-r.hatenablog.com/entry/20131222/1387726397" class="urllist-title-link related-entries-title-link urllist-title related-entries-title">Luceneの個人的テンプレートコード</a> <div class="urllist-entry-body related-entries-entry-body">Luceneのコードを書いていて、いつも同じようなコードの変形パ…</div> </div> </li> </ul> </div> </div> </div> </div> <div class="comment-box js-comment-box"> <ul class="comment js-comment"> <li class="read-more-comments" style="display: none;"><a>もっと読む</a></li> </ul> <a class="leave-comment-title js-leave-comment-title">コメントを書く</a> </div> </footer> </div> </article> <!-- rakuten_ad_target_end --> <!-- google_ad_section_end --> <div class="pager pager-permalink permalink"> <span class="pager-prev"> <a href="https://kazuhira-r.hatenablog.com/entry/20131001/1380638997" rel="prev"> <span class="pager-arrow">« </span> NIOのByteBufferを使って、プリミティブ型… </a> </span> <span class="pager-next"> <a href="https://kazuhira-r.hatenablog.com/entry/20130929/1380449951" rel="next"> Infinispan停止時にCacheのエントリがどう… <span class="pager-arrow"> »</span> </a> </span> </div> </div> </div> <aside id="box1"> <div id="box1-inner"> </div> </aside> </div><!-- #wrapper --> <aside id="box2"> <div id="box2-inner"> <div class="hatena-module hatena-module-profile"> <div class="hatena-module-title"> プロフィール </div> <div class="hatena-module-body"> <a href="https://kazuhira-r.hatenablog.com/about" class="profile-icon-link"> <img src="https://cdn.profile-image.st-hatena.com/users/Kazuhira/profile.png?1356877606" alt="id:Kazuhira" class="profile-icon" /> </a> <span class="id"> <a href="https://kazuhira-r.hatenablog.com/about" class="hatena-id-link"><span data-load-nickname="1" data-user-name="Kazuhira">id:Kazuhira</span></a> </span> <div class="profile-description"> <p>Sunday Programmer's Diary</p> </div> <div class="hatena-follow-button-box btn-subscribe js-hatena-follow-button-box" > <a href="#" class="hatena-follow-button js-hatena-follow-button"> <span class="subscribing"> <span class="foreground">読者です</span> <span class="background">読者をやめる</span> </span> <span class="unsubscribing" data-track-name="profile-widget-subscribe-button" data-track-once> <span class="foreground">読者になる</span> <span class="background">読者になる</span> </span> </a> <div class="subscription-count-box js-subscription-count-box"> <i></i> <u></u> <span class="subscription-count js-subscription-count"> </span> </div> </div> <div class="profile-about"> <a href="https://kazuhira-r.hatenablog.com/about">このブログについて</a> </div> </div> </div> <div class="hatena-module hatena-module-search-box"> <div class="hatena-module-title"> 検索 </div> <div class="hatena-module-body"> <form class="search-form" role="search" action="https://kazuhira-r.hatenablog.com/search" method="get"> <input type="text" name="q" class="search-module-input" value="" placeholder="記事を検索" required> <input type="submit" value="検索" class="search-module-button" /> </form> </div> </div> <div class="hatena-module hatena-module-links"> <div class="hatena-module-title"> リンク </div> <div class="hatena-module-body"> <ul class="hatena-urllist"> <li> <a href="https://hatena.blog/">はてなブログ</a> </li> <li> <a href="https://hatena.blog/guide?via=200109">ブログをはじめる</a> </li> <li> <a href="http://blog.hatenablog.com">週刊はてなブログ</a> </li> <li> <a href="https://hatena.blog/guide/pro">はてなブログPro</a> </li> </ul> </div> </div> <div class="hatena-module hatena-module-archive" data-archive-type="default" data-archive-url="https://kazuhira-r.hatenablog.com/archive"> <div class="hatena-module-title"> <a href="https://kazuhira-r.hatenablog.com/archive">月別アーカイブ</a> </div> <div class="hatena-module-body"> <ul class="hatena-urllist"> <li class="archive-module-year archive-module-year-hidden" data-year="2024"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://kazuhira-r.hatenablog.com/archive/2024" class="archive-module-year-title archive-module-year-2024"> 2024 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2024/12" class="archive-module-month-title archive-module-month-2024-12"> 2024 / 12 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2024/11" class="archive-module-month-title archive-module-month-2024-11"> 2024 / 11 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2024/10" class="archive-module-month-title archive-module-month-2024-10"> 2024 / 10 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2024/09" class="archive-module-month-title archive-module-month-2024-9"> 2024 / 9 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2024/08" class="archive-module-month-title archive-module-month-2024-8"> 2024 / 8 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2024/07" class="archive-module-month-title archive-module-month-2024-7"> 2024 / 7 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2024/06" class="archive-module-month-title archive-module-month-2024-6"> 2024 / 6 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2024/05" class="archive-module-month-title archive-module-month-2024-5"> 2024 / 5 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2024/04" class="archive-module-month-title archive-module-month-2024-4"> 2024 / 4 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2024/03" class="archive-module-month-title archive-module-month-2024-3"> 2024 / 3 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2024/02" class="archive-module-month-title archive-module-month-2024-2"> 2024 / 2 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2024/01" class="archive-module-month-title archive-module-month-2024-1"> 2024 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2023"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://kazuhira-r.hatenablog.com/archive/2023" class="archive-module-year-title archive-module-year-2023"> 2023 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2023/12" class="archive-module-month-title archive-module-month-2023-12"> 2023 / 12 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2023/11" class="archive-module-month-title archive-module-month-2023-11"> 2023 / 11 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2023/10" class="archive-module-month-title archive-module-month-2023-10"> 2023 / 10 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2023/09" class="archive-module-month-title archive-module-month-2023-9"> 2023 / 9 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2023/08" class="archive-module-month-title archive-module-month-2023-8"> 2023 / 8 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2023/07" class="archive-module-month-title archive-module-month-2023-7"> 2023 / 7 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2023/06" class="archive-module-month-title archive-module-month-2023-6"> 2023 / 6 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2023/05" class="archive-module-month-title archive-module-month-2023-5"> 2023 / 5 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2023/04" class="archive-module-month-title archive-module-month-2023-4"> 2023 / 4 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2023/03" class="archive-module-month-title archive-module-month-2023-3"> 2023 / 3 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2023/02" class="archive-module-month-title archive-module-month-2023-2"> 2023 / 2 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2023/01" class="archive-module-month-title archive-module-month-2023-1"> 2023 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2022"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://kazuhira-r.hatenablog.com/archive/2022" class="archive-module-year-title archive-module-year-2022"> 2022 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2022/12" class="archive-module-month-title archive-module-month-2022-12"> 2022 / 12 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2022/11" class="archive-module-month-title archive-module-month-2022-11"> 2022 / 11 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2022/10" class="archive-module-month-title archive-module-month-2022-10"> 2022 / 10 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2022/09" class="archive-module-month-title archive-module-month-2022-9"> 2022 / 9 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2022/08" class="archive-module-month-title archive-module-month-2022-8"> 2022 / 8 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2022/07" class="archive-module-month-title archive-module-month-2022-7"> 2022 / 7 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2022/06" class="archive-module-month-title archive-module-month-2022-6"> 2022 / 6 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2022/05" class="archive-module-month-title archive-module-month-2022-5"> 2022 / 5 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2022/04" class="archive-module-month-title archive-module-month-2022-4"> 2022 / 4 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2022/03" class="archive-module-month-title archive-module-month-2022-3"> 2022 / 3 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2022/02" class="archive-module-month-title archive-module-month-2022-2"> 2022 / 2 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2022/01" class="archive-module-month-title archive-module-month-2022-1"> 2022 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2021"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://kazuhira-r.hatenablog.com/archive/2021" class="archive-module-year-title archive-module-year-2021"> 2021 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2021/12" class="archive-module-month-title archive-module-month-2021-12"> 2021 / 12 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2021/11" class="archive-module-month-title archive-module-month-2021-11"> 2021 / 11 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2021/10" class="archive-module-month-title archive-module-month-2021-10"> 2021 / 10 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2021/09" class="archive-module-month-title archive-module-month-2021-9"> 2021 / 9 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2021/08" class="archive-module-month-title archive-module-month-2021-8"> 2021 / 8 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2021/07" class="archive-module-month-title archive-module-month-2021-7"> 2021 / 7 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2021/06" class="archive-module-month-title archive-module-month-2021-6"> 2021 / 6 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2021/05" class="archive-module-month-title archive-module-month-2021-5"> 2021 / 5 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2021/04" class="archive-module-month-title archive-module-month-2021-4"> 2021 / 4 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2021/03" class="archive-module-month-title archive-module-month-2021-3"> 2021 / 3 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2021/02" class="archive-module-month-title archive-module-month-2021-2"> 2021 / 2 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2021/01" class="archive-module-month-title archive-module-month-2021-1"> 2021 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2020"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://kazuhira-r.hatenablog.com/archive/2020" class="archive-module-year-title archive-module-year-2020"> 2020 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2020/12" class="archive-module-month-title archive-module-month-2020-12"> 2020 / 12 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2020/11" class="archive-module-month-title archive-module-month-2020-11"> 2020 / 11 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2020/10" class="archive-module-month-title archive-module-month-2020-10"> 2020 / 10 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2020/09" class="archive-module-month-title archive-module-month-2020-9"> 2020 / 9 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2020/08" class="archive-module-month-title archive-module-month-2020-8"> 2020 / 8 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2020/07" class="archive-module-month-title archive-module-month-2020-7"> 2020 / 7 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2020/06" class="archive-module-month-title archive-module-month-2020-6"> 2020 / 6 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2020/05" class="archive-module-month-title archive-module-month-2020-5"> 2020 / 5 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2020/04" class="archive-module-month-title archive-module-month-2020-4"> 2020 / 4 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2020/03" class="archive-module-month-title archive-module-month-2020-3"> 2020 / 3 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2020/02" class="archive-module-month-title archive-module-month-2020-2"> 2020 / 2 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2020/01" class="archive-module-month-title archive-module-month-2020-1"> 2020 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2019"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://kazuhira-r.hatenablog.com/archive/2019" class="archive-module-year-title archive-module-year-2019"> 2019 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2019/12" class="archive-module-month-title archive-module-month-2019-12"> 2019 / 12 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2019/11" class="archive-module-month-title archive-module-month-2019-11"> 2019 / 11 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2019/10" class="archive-module-month-title archive-module-month-2019-10"> 2019 / 10 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2019/09" class="archive-module-month-title archive-module-month-2019-9"> 2019 / 9 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2019/08" class="archive-module-month-title archive-module-month-2019-8"> 2019 / 8 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2019/07" class="archive-module-month-title archive-module-month-2019-7"> 2019 / 7 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2019/06" class="archive-module-month-title archive-module-month-2019-6"> 2019 / 6 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2019/05" class="archive-module-month-title archive-module-month-2019-5"> 2019 / 5 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2019/04" class="archive-module-month-title archive-module-month-2019-4"> 2019 / 4 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2019/03" class="archive-module-month-title archive-module-month-2019-3"> 2019 / 3 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2019/02" class="archive-module-month-title archive-module-month-2019-2"> 2019 / 2 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2019/01" class="archive-module-month-title archive-module-month-2019-1"> 2019 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2018"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://kazuhira-r.hatenablog.com/archive/2018" class="archive-module-year-title archive-module-year-2018"> 2018 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2018/12" class="archive-module-month-title archive-module-month-2018-12"> 2018 / 12 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2018/11" class="archive-module-month-title archive-module-month-2018-11"> 2018 / 11 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2018/10" class="archive-module-month-title archive-module-month-2018-10"> 2018 / 10 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2018/09" class="archive-module-month-title archive-module-month-2018-9"> 2018 / 9 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2018/08" class="archive-module-month-title archive-module-month-2018-8"> 2018 / 8 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2018/07" class="archive-module-month-title archive-module-month-2018-7"> 2018 / 7 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2018/06" class="archive-module-month-title archive-module-month-2018-6"> 2018 / 6 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2018/05" class="archive-module-month-title archive-module-month-2018-5"> 2018 / 5 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2018/04" class="archive-module-month-title archive-module-month-2018-4"> 2018 / 4 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2018/03" class="archive-module-month-title archive-module-month-2018-3"> 2018 / 3 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2018/02" class="archive-module-month-title archive-module-month-2018-2"> 2018 / 2 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2018/01" class="archive-module-month-title archive-module-month-2018-1"> 2018 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2017"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://kazuhira-r.hatenablog.com/archive/2017" class="archive-module-year-title archive-module-year-2017"> 2017 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2017/12" class="archive-module-month-title archive-module-month-2017-12"> 2017 / 12 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2017/11" class="archive-module-month-title archive-module-month-2017-11"> 2017 / 11 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2017/10" class="archive-module-month-title archive-module-month-2017-10"> 2017 / 10 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2017/09" class="archive-module-month-title archive-module-month-2017-9"> 2017 / 9 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2017/08" class="archive-module-month-title archive-module-month-2017-8"> 2017 / 8 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2017/07" class="archive-module-month-title archive-module-month-2017-7"> 2017 / 7 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2017/06" class="archive-module-month-title archive-module-month-2017-6"> 2017 / 6 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2017/05" class="archive-module-month-title archive-module-month-2017-5"> 2017 / 5 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2017/04" class="archive-module-month-title archive-module-month-2017-4"> 2017 / 4 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2017/03" class="archive-module-month-title archive-module-month-2017-3"> 2017 / 3 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2017/02" class="archive-module-month-title archive-module-month-2017-2"> 2017 / 2 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2017/01" class="archive-module-month-title archive-module-month-2017-1"> 2017 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2016"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://kazuhira-r.hatenablog.com/archive/2016" class="archive-module-year-title archive-module-year-2016"> 2016 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2016/12" class="archive-module-month-title archive-module-month-2016-12"> 2016 / 12 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2016/11" class="archive-module-month-title archive-module-month-2016-11"> 2016 / 11 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2016/10" class="archive-module-month-title archive-module-month-2016-10"> 2016 / 10 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2016/09" class="archive-module-month-title archive-module-month-2016-9"> 2016 / 9 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2016/08" class="archive-module-month-title archive-module-month-2016-8"> 2016 / 8 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2016/07" class="archive-module-month-title archive-module-month-2016-7"> 2016 / 7 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2016/06" class="archive-module-month-title archive-module-month-2016-6"> 2016 / 6 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2016/05" class="archive-module-month-title archive-module-month-2016-5"> 2016 / 5 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2016/04" class="archive-module-month-title archive-module-month-2016-4"> 2016 / 4 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2016/03" class="archive-module-month-title archive-module-month-2016-3"> 2016 / 3 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2016/02" class="archive-module-month-title archive-module-month-2016-2"> 2016 / 2 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2016/01" class="archive-module-month-title archive-module-month-2016-1"> 2016 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2015"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://kazuhira-r.hatenablog.com/archive/2015" class="archive-module-year-title archive-module-year-2015"> 2015 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2015/12" class="archive-module-month-title archive-module-month-2015-12"> 2015 / 12 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2015/11" class="archive-module-month-title archive-module-month-2015-11"> 2015 / 11 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2015/10" class="archive-module-month-title archive-module-month-2015-10"> 2015 / 10 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2015/09" class="archive-module-month-title archive-module-month-2015-9"> 2015 / 9 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2015/08" class="archive-module-month-title archive-module-month-2015-8"> 2015 / 8 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2015/07" class="archive-module-month-title archive-module-month-2015-7"> 2015 / 7 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2015/06" class="archive-module-month-title archive-module-month-2015-6"> 2015 / 6 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2015/05" class="archive-module-month-title archive-module-month-2015-5"> 2015 / 5 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2015/04" class="archive-module-month-title archive-module-month-2015-4"> 2015 / 4 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2015/03" class="archive-module-month-title archive-module-month-2015-3"> 2015 / 3 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2015/02" class="archive-module-month-title archive-module-month-2015-2"> 2015 / 2 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2015/01" class="archive-module-month-title archive-module-month-2015-1"> 2015 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2014"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://kazuhira-r.hatenablog.com/archive/2014" class="archive-module-year-title archive-module-year-2014"> 2014 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2014/12" class="archive-module-month-title archive-module-month-2014-12"> 2014 / 12 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2014/11" class="archive-module-month-title archive-module-month-2014-11"> 2014 / 11 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2014/10" class="archive-module-month-title archive-module-month-2014-10"> 2014 / 10 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2014/09" class="archive-module-month-title archive-module-month-2014-9"> 2014 / 9 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2014/08" class="archive-module-month-title archive-module-month-2014-8"> 2014 / 8 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2014/07" class="archive-module-month-title archive-module-month-2014-7"> 2014 / 7 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2014/06" class="archive-module-month-title archive-module-month-2014-6"> 2014 / 6 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2014/05" class="archive-module-month-title archive-module-month-2014-5"> 2014 / 5 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2014/04" class="archive-module-month-title archive-module-month-2014-4"> 2014 / 4 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2014/03" class="archive-module-month-title archive-module-month-2014-3"> 2014 / 3 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2014/02" class="archive-module-month-title archive-module-month-2014-2"> 2014 / 2 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2014/01" class="archive-module-month-title archive-module-month-2014-1"> 2014 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2013"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://kazuhira-r.hatenablog.com/archive/2013" class="archive-module-year-title archive-module-year-2013"> 2013 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2013/12" class="archive-module-month-title archive-module-month-2013-12"> 2013 / 12 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2013/11" class="archive-module-month-title archive-module-month-2013-11"> 2013 / 11 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2013/10" class="archive-module-month-title archive-module-month-2013-10"> 2013 / 10 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2013/09" class="archive-module-month-title archive-module-month-2013-9"> 2013 / 9 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2013/08" class="archive-module-month-title archive-module-month-2013-8"> 2013 / 8 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2013/07" class="archive-module-month-title archive-module-month-2013-7"> 2013 / 7 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2013/06" class="archive-module-month-title archive-module-month-2013-6"> 2013 / 6 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2013/05" class="archive-module-month-title archive-module-month-2013-5"> 2013 / 5 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2013/04" class="archive-module-month-title archive-module-month-2013-4"> 2013 / 4 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2013/03" class="archive-module-month-title archive-module-month-2013-3"> 2013 / 3 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2013/02" class="archive-module-month-title archive-module-month-2013-2"> 2013 / 2 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2013/01" class="archive-module-month-title archive-module-month-2013-1"> 2013 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2012"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://kazuhira-r.hatenablog.com/archive/2012" class="archive-module-year-title archive-module-year-2012"> 2012 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2012/12" class="archive-module-month-title archive-module-month-2012-12"> 2012 / 12 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2012/11" class="archive-module-month-title archive-module-month-2012-11"> 2012 / 11 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2012/10" class="archive-module-month-title archive-module-month-2012-10"> 2012 / 10 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2012/09" class="archive-module-month-title archive-module-month-2012-9"> 2012 / 9 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2012/08" class="archive-module-month-title archive-module-month-2012-8"> 2012 / 8 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2012/07" class="archive-module-month-title archive-module-month-2012-7"> 2012 / 7 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2012/06" class="archive-module-month-title archive-module-month-2012-6"> 2012 / 6 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2012/05" class="archive-module-month-title archive-module-month-2012-5"> 2012 / 5 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2012/04" class="archive-module-month-title archive-module-month-2012-4"> 2012 / 4 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2012/03" class="archive-module-month-title archive-module-month-2012-3"> 2012 / 3 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2012/02" class="archive-module-month-title archive-module-month-2012-2"> 2012 / 2 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2012/01" class="archive-module-month-title archive-module-month-2012-1"> 2012 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2011"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://kazuhira-r.hatenablog.com/archive/2011" class="archive-module-year-title archive-module-year-2011"> 2011 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2011/12" class="archive-module-month-title archive-module-month-2011-12"> 2011 / 12 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2011/11" class="archive-module-month-title archive-module-month-2011-11"> 2011 / 11 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2011/10" class="archive-module-month-title archive-module-month-2011-10"> 2011 / 10 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2011/09" class="archive-module-month-title archive-module-month-2011-9"> 2011 / 9 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2011/08" class="archive-module-month-title archive-module-month-2011-8"> 2011 / 8 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2011/07" class="archive-module-month-title archive-module-month-2011-7"> 2011 / 7 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2011/06" class="archive-module-month-title archive-module-month-2011-6"> 2011 / 6 </a> </li> <li class="archive-module-month"> <a href="https://kazuhira-r.hatenablog.com/archive/2011/05" class="archive-module-month-title archive-module-month-2011-5"> 2011 / 5 </a> </li> </ul> </li> </ul> </div> </div> </div> </aside> </div> </div> </div> </div> <footer id="footer" data-brand="hatenablog"> <div id="footer-inner"> <div style="display:none !important" class="guest-footer js-guide-register test-blogs-register-guide" data-action="guide-register"> <div class="guest-footer-content"> <h3>はてなブログをはじめよう!</h3> <p>Kazuhiraさんは、はてなブログを使っています。あなたもはてなブログをはじめてみませんか?</p> <div class="guest-footer-btn-container"> <div class="guest-footer-btn"> <a class="btn btn-register js-inherit-ga" href="https://blog.hatena.ne.jp/register?via=200227" target="_blank">はてなブログをはじめる(無料)</a> </div> <div class="guest-footer-btn"> <a href="https://hatena.blog/guide" target="_blank">はてなブログとは</a> </div> </div> </div> </div> <address class="footer-address"> <a href="https://kazuhira-r.hatenablog.com/"> <img src="https://cdn.blog.st-hatena.com/images/admin/blog-icon-noimage.png" width="16" height="16" alt="CLOVER🍀"/> <span class="footer-address-name">CLOVER🍀</span> </a> </address> <p class="services"> Powered by <a href="https://hatena.blog/">Hatena Blog</a> | <a href="https://blog.hatena.ne.jp/-/abuse_report?target_url=https%3A%2F%2Fkazuhira-r.hatenablog.com%2Fentry%2F20131001%2F1380635740" class="report-abuse-link test-report-abuse-link" target="_blank">ブログを報告する</a> </p> </div> </footer> <script async src="https://s.hatena.ne.jp/js/widget/star.js"></script> <script> if (typeof window.Hatena === 'undefined') { window.Hatena = {}; } if (!Hatena.hasOwnProperty('Star')) { Hatena.Star = { VERSION: 2, }; } </script> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/ja_JP/sdk.js#xfbml=1&appId=719729204785177&version=v17.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="quote-box"> <div class="tooltip-quote tooltip-quote-stock"> <i class="blogicon-quote" title="引用をストック"></i> </div> <div class="tooltip-quote tooltip-quote-tweet js-tooltip-quote-tweet"> <a class="js-tweet-quote" target="_blank" data-track-name="quote-tweet" data-track-once> <img src="https://cdn.blog.st-hatena.com/images/admin/quote/quote-x-icon.svg?version=d3133fa23ac59bde76d93e1a904534" title="引用して投稿する" > </a> </div> </div> <div class="quote-stock-panel" id="quote-stock-message-box" style="position: absolute; z-index: 3000"> <div class="message-box" id="quote-stock-succeeded-message" style="display: none"> <p>引用をストックしました</p> <button class="btn btn-primary" id="quote-stock-show-editor-button" data-track-name="curation-quote-edit-button">ストック一覧を見る</button> <button class="btn quote-stock-close-message-button">閉じる</button> </div> <div class="message-box" id="quote-login-required-message" style="display: none"> <p>引用するにはまずログインしてください</p> <button class="btn btn-primary" id="quote-login-button">ログイン</button> <button class="btn quote-stock-close-message-button">閉じる</button> </div> <div class="error-box" id="quote-stock-failed-message" style="display: none"> <p>引用をストックできませんでした。再度お試しください</p> <button class="btn quote-stock-close-message-button">閉じる</button> </div> <div class="error-box" id="unstockable-quote-message-box" style="display: none; position: absolute; z-index: 3000;"> <p>限定公開記事のため引用できません。</p> </div> </div> <script type="x-underscore-template" id="js-requote-button-template"> <div class="requote-button js-requote-button"> <button class="requote-button-btn tipsy-top" title="引用する"><i class="blogicon-quote"></i></button> </div> </script> <div id="hidden-subscribe-button" style="display: none;"> <div class="hatena-follow-button-box btn-subscribe js-hatena-follow-button-box" > <a href="#" class="hatena-follow-button js-hatena-follow-button"> <span class="subscribing"> <span class="foreground">読者です</span> <span class="background">読者をやめる</span> </span> <span class="unsubscribing" data-track-name="profile-widget-subscribe-button" data-track-once> <span class="foreground">読者になる</span> <span class="background">読者になる</span> </span> </a> <div class="subscription-count-box js-subscription-count-box"> <i></i> <u></u> <span class="subscription-count js-subscription-count"> </span> </div> </div> </div> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> <script src="https://b.st-hatena.com/js/bookmark_button.js" charset="utf-8" async="async"></script> <script type="text/javascript" src="https://cdn.blog.st-hatena.com/js/external/jquery.min.js?v=1.12.4&version=d3133fa23ac59bde76d93e1a904534"></script> <script src="https://cdn.blog.st-hatena.com/js/texts-ja.js?version=d3133fa23ac59bde76d93e1a904534"></script> <script id="vendors-js" data-env="production" src="https://cdn.blog.st-hatena.com/js/vendors.js?version=d3133fa23ac59bde76d93e1a904534" crossorigin="anonymous"></script> <script id="hatenablog-js" data-env="production" src="https://cdn.blog.st-hatena.com/js/hatenablog.js?version=d3133fa23ac59bde76d93e1a904534" crossorigin="anonymous" data-page-id="entry"></script> <script>Hatena.Diary.GlobalHeader.init()</script> <script id="valve-dmp" data-service="blog" src="https://cdn.pool.st-hatena.com/valve/dmp.js" data-test-id="dmpjs" async></script> </body> </html>