This domain may be for sale!
ブログ検索において、RSSは必ずしも記事全文を配信していないので、クローラーが記事のURLにアクセスし記事の本文を取得するケースが多いようです。 「gooブログ検索」「ブログレンジャー」開発者が語るブログ検索技術Yahoo!検索 スタッフブログ Yahoo!ブログ検索より細部改善のお知らせ上記の記事ではどちらも本文を抽出してくる、とあっさり書かれていますが100%に近い精度を実現するとなるとそう簡単ではないはず。 ちょっと調べてみたら以下のような取り組みが論文として読めました。英語圏の文献は、検索語が悪かったのかいまいち。「blog entry extract body text etc…」 NRI 技術創発 ブログ記事の自動分類により消費者意識の側面を捉える試み(PDF)なんでもRSS! HTML文書からのRSS Feed 自動生成 南野朋之 奥村学:人工知能学会研究会資料 SIG-SW
日本語サイトでは、具体的な性能は測定していませんが、 以下のようなサイトで正しく動くことがわかっています: アサヒ・コム Nikkei NET Mainichi INTERACTIVE Yomiuri On-line IT media 東京新聞 日刊スポーツ 信濃毎日新聞 livedoor ニュース 使いかた Webstemmer をつかったテキスト抽出は以下のようなステップになります: まず、特定のニュースサイトから種となる HTML ページを多数取得する。 取得したページのレイアウトを学習する。 別の日に、同一のニュースサイトから新しい HTML ページを取得する。 2. で学習した結果をつかって、新しい HTML ページから本文を抽出する。 1. および 2. のステップが必要なのは最初の 1回だけです。 ひとたびサイトのレイアウトを学習してしまえば、 あとはレイアウトが大きく変更さ
これはやばい!凄すぎる。 現在進めようと思っているプロジェクトでは、サイト上の本文抽出が重要な技術になっていた。だが、それを一から開発していたのではあまりに時間がかかってしまう。さらに重要な技術ではあるが、それが売りと言う訳ではなかった。 そこで見つけたのがこのソフトウェアだ。まさに理想的な方法かも知れない。 今回紹介するオープンソース・ソフトウェアはWebstemmer、タイトル・本文抽出クローラーだ。 WebstemmerはPythonで作られたクローラーで、Webクローラー/レイアウト分析/テキスト抽出/URL DB操作/簡易的なテキスト抽出の5つの機能が提供されている。 動作原理については公式サイトを参考にして欲しいが、個人的にも考えていた(考えていただけ)方法に近い。学習時間が長いのが難点だが、複数台のPCで分散化できれば問題なくなるだろう。 特徴的なのは、特定の言語に左右される
back [English] 基本的な原理 レイアウト分析ツール analyze.py 本文を抽出する extract.py パターンファイルの構造 おわりに 基本的な原理 Webstemmer では、以下のような仮定をもとにして Web ページを分析しています。 すべての記事には共通した (たかだか数種類の) レイアウトが使われている。 各ページにはメインとなる文章がひとつ含まれている。 (従って、この原理は日記や掲示板などのサイトには使えません) 記事の文章は毎日変わっても、そのレイアウトは変わらない。 バナー広告やナビゲーションの HTML タグは同一レイアウトのページで不変。 Webstemmer はこの仮定をもとに、 あるニュースサイトの同一レイアウトをもつページをまとめ、 それらのページ中で「変化していない部分」をさがします。 バナーやナビゲーション用のリンクなどはレイアウトが
NAME WWW::Wikipedia::Entry - A class for representing a Wikipedia Entry SYNOPSIS my $wiki = WWW::Wikipedia->new(); my $entry = $wiki->search( 'Perl' ); print $entry->text(); my $entry_es = $entry->language( 'es' ); print $entry_es->text(); DESCRIPTION WWW::Wikipedia::Entry objects are usually created using the search() method on a WWW::Wikipedia object to search for a term. Once you've got an entr
はてなグループの終了日を2020年1月31日(金)に決定しました 以下のエントリの通り、今年末を目処にはてなグループを終了予定である旨をお知らせしておりました。 2019年末を目処に、はてなグループの提供を終了する予定です - はてなグループ日記 このたび、正式に終了日を決定いたしましたので、以下の通りご確認ください。 終了日: 2020年1月31日(金) エクスポート希望申請期限:2020年1月31日(金) 終了日以降は、はてなグループの閲覧および投稿は行えません。日記のエクスポートが必要な方は以下の記事にしたがって手続きをしてください。 はてなグループに投稿された日記データのエクスポートについて - はてなグループ日記 ご利用のみなさまにはご迷惑をおかけいたしますが、どうぞよろしくお願いいたします。 2020-06-25 追記 はてなグループ日記のエクスポートデータは2020年2月28
NAME WWW::Mechanize::Shell - An interactive shell for WWW::Mechanize SYNOPSIS From the command line as perl -MWWW::Mechanize::Shell -eshell or alternatively as a custom shell program via : #!/usr/bin/perl -w use strict; use WWW::Mechanize::Shell; my $shell = WWW::Mechanize::Shell->new("shell"); if (@ARGV) { $shell->source_file( @ARGV ); } else { $shell->cmdloop; }; DESCRIPTION This module implemen
ここ数日でHTMLからTagを除去する方法を、色々知った。とても勉強になりました。教えてくれた人ありがとうです。 具体的には、BeautifulSoupとHTMLParserとlxmlという3つのライブラリでそれぞれTag除去が可能な事が分かった。実際どれも満足な挙動で、じゃあどれを使えばいいのさ!と、迷ったので実行速度を適当に測ってみた。 時間を計るところのコードが激しく恥ずかしい。ホントは、3つのファンクションを配列に入れて、forで回したかったけど、配列に入れる時に評価されてしまってNG、map関数で、関数と関数(計測したい関数と、計測する関数)を2つ渡すやり方がわかんなかったので、同じ事を3回書く事にした。マジ恥ずかしいがこれしか思いつかなかった。 計測用のHTMLには、はてダのトップページとした、コメント、Style、Script、htmlがそこそこのボリュームで入っていた為 計
cURL " src="/arrow.png"> libcurl " src="/arrow.png"> PHP " src="/arrow.png"> ExamplesPHP/CURL Examples Collection We try to collect examples on how to program the PHP/CURL interface here. If you have any source snippests you want to share with the rest of the world, please let us know! ExampleDescriptionAuthor
Today I've been thinking about what to talk in YAPC::EU (and OSCON if they're short of Perl talks, I'm not sure), and came up with a few hours of hacking with web-content scraping module using Domain Specific Languages. 使ってみたよ! #!/usr/local/bin/perl use strict; use warnings; use FindBin::libs; use URI; use Web::Scraper; use Encode; use List::MoreUtils qw/uniq/; my $links = scraper { process 'a.key
今回は、為替レートをスクレイピングにより取得してみましょう。といっても、実際は為替レートが表示されているHTMLファイルをスクレイピングし、該当箇所を抜き出すだけなので、基本は殆ど同じです。 今回利用するサイトはひまわり証券株式会社 ブログパーツ FXレートウォッチャーです。元がブログパーツなので、取得するHTMLファイルの容量も少なくてよさそうなので、今回は、このサイトを利用してみます。 上記のサイトでは、<IFRAME>タグを利用して、パーツを表示するタイプです。なので、<IFRAME>タグのsrcのアトリビュートで指定されている、 を対象にしてみます。 サンプルソースを見ながら解説を進めます。 rate.php proxy.php ではプログラムを見てみましょう。 前回のはてなフォトライフではスクレイピング対象となるHTMLファイルを動的に変化させましたが、今回は固定ですね。3行目の
2003/06/08 内容を見直し、説明を丁寧にして、図を増やしてみました。 2003/01/30 指摘していただいた間違いを修正しました。 location pathで、 相対location pathと絶対location pathの英語表記が逆になってしまっていました。 申し訳ありません。 2002/02/17 だいぶ久々ですが、内容を見直しました。 説明をなるべく丁寧にして、実例を増やしました。 以前に比べれば分かりやすくなったと思うのですが、どうでしょう。 2000/12/17 XPathのコア関数ライブラリについての内容を追加して、 一通りXPathについて網羅したはずです(書き忘れがなければ)。 今後は、より分かりやすくするための見直しを行なっていきます。 2000/10/15 expressionについて、演算子を中心に内容を更新しました
Latest topics > CSS3セレクタとXPathでの表現の対応表 宣伝。日経LinuxにてLinuxの基礎?を紹介する漫画「シス管系女子」を連載させていただいています。 以下の特設サイトにて、単行本まんがでわかるLinux シス管系女子の試し読みが可能! « getElementsByなんちゃら の代わりにXPathを使う Main Mozilla 24 » CSS3セレクタとXPathでの表現の対応表 - Sep 13, 2007 拡張機能勉強会の時に焚き付けられた、Text Shadowのコード(textshadow.js)を教材にして拡張機能開発のノウハウを解説していくシリーズ。 XPathをノードの検索に活用する方法を紹介したけど、肝心のXPathが書けなきゃ意味がないわけで。でもXPathって、ノードセットがどうとかノードテストがどうとか軸がどうとか修飾がどうとか、い
「ウェブリブログ」は 2023年1月31日 をもちましてサービス提供を終了いたしました。 2004年3月のサービス開始より19年近くもの間、沢山の皆さまにご愛用いただきましたことを心よりお礼申し上げます。今後とも、BIGLOBEをご愛顧賜りますよう、よろしくお願い申し上げます。 ※引っ越し先ブログへのリダイレクトサービスは2024年1月31日で終了いたしました。 BIGLOBEのサービス一覧
様々なオンラインブックマークサービスのブックマーク件数を画像ではなくて数値で取得(高機能版) スポンサードリンク Tweet 先日作った「様々なオンラインブックマークサービスのブックマーク件数を画像ではなくて数値で取得」が無駄にパワーアップしました。 無駄にLast-modifiedとか吐くようになり、ブラウザから無駄に問い合わせこないようにしました。 無駄にブラウザからのヘッダのIf-Modified-Sinceと比較して304を吐くようになり、無駄に転送しないようになりました。 無駄にmod_perl環境でも動きます(Apache2のModPerl::Registryで動いています)。 無駄にJSONまたはJSONPを吐くようになりました。ブログパーツ用。 無駄にJavaScriptのdocument.writeを吐けるようになりました。ブログパーツ用。 負荷が気になる場合は、自分の手
SBMはいっぱいありますけど、ブックマーク件数を取得するには、 XMLRPCやらJSONやらRESTやらでいろいろ違うんで、 簡単に取得できるクラスが欲しいと思って作りました。 Perlで書かれてるこちらをかなり参考にさせてもらってます。 というかこれのRuby版という感じになります。 ちなみに、SBMは、はてなブックマーク、livedoorクリップ、Yahoo!ブックマーク、 del.icio.us、Buzzurl、FC2ブックマーク、POOKMARK Airlinesの7つ利用できるようにしています。 JSONライブラリのインストール プログラム内でJSON解析のためにgemからライブラリを持ってきてるので、 以下のようにしてインストールしてください。 # gem install json ブックマーク件数取得プログラム ブックマーク件数取得用ライブラリのプログラムは以下のようになりま
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く