Git Product home page Git Product logo

japanese-ir-baselines's Introduction

Japanese IR Baselines 日本語情報検索ベースライン

NTCIR Data Search 1 (日本語,test)

データセットの準備

$ poetry run python -m baselines.prepare_dataset \
  ntcir_data_search_j \
  datasets/ntcir_data_search_j

索引付け

$ poetry run python -m pyserini.index.lucene \
  --collection JsonCollection \
  --input datasets/ntcir_data_search_j/docs \
  --language ja \
  --index indexes/ntcir_data_search_j \
  --generator DefaultLuceneDocumentGenerator \
  --threads 10 \
  --storePositions --storeDocvectors --storeRaw

検索

$ poetry run python -m pyserini.search.lucene \
  --index indexes/ntcir_data_search_j \
  --topics datasets/ntcir_data_search_j/test_topics.tsv \
  --output results/ntcir_data_search_j_bm25.trec \
  --language ja \
  --bm25

評価

$ poetry run ir_measures datasets/ntcir_data_search_j/test_qrels.txt results/ntcir_data_search_j_bm25.trec nDCG@10

MIRACL (日本語,dev)

データセットの準備

$ poetry run python -m baselines.prepare_dataset \
  miracl_j \
  datasets/miracl_j

索引付け

$ poetry run python -m pyserini.index.lucene \
  --collection JsonCollection \
  --input datasets/miracl_j/docs \
  --language ja \
  --index indexes/miracl_j \
  --generator DefaultLuceneDocumentGenerator \
  --threads 10 \
  --storePositions --storeDocvectors --storeRaw

検索

$ poetry run python -m pyserini.search.lucene \
  --index indexes/miracl_j \
  --topics datasets/miracl_j/test_topics.tsv \
  --output results/miracl_j_bm25.trec \
  --language ja \
  --bm25

評価

$ poetry run ir_measures datasets/miracl_j/test_qrels.txt results/miracl_j_bm25.trec nDCG@10

NTCIR-1 単言語検索(日本語,test)

データセットの入手

  1. NTCIR-1: 情報検索/用語抽出研究用テストコレクションから「テストコレクション利用申込書」にしたがって利用申込を行う
  2. 得られたZipファイルを解凍してMLIR.TGZTOPICS.TGZoriginal_data/NTCIR-1/以下などに展開しておく
  3. 以下のファイルを読み込めることをlessコマンドなどで確認しておく(違う場所に展開されている場合にはconfig.yamlファイルの設定を変更しても良い)
  • original_data/NTCIR-1/topics/topic0031-0083
  • original_data/NTCIR-1/mlir/rel2_ntc1-j1_0031-0083
  • original_data/NTCIR-1/mlir/ntc1-j1

データセットの準備

$ poetry run python -m baselines.prepare_dataset \
  ntcir_1_j \
  datasets/ntcir_1_j

索引付け

$ poetry run python -m pyserini.index.lucene \
  --collection JsonCollection \
  --input datasets/ntcir_1_j/docs \
  --language ja \
  --index indexes/ntcir_1_j \
  --generator DefaultLuceneDocumentGenerator \
  --threads 10 \
  --storePositions --storeDocvectors --storeRaw

検索

$ poetry run python -m pyserini.search.lucene \
  --index indexes/ntcir_1_j \
  --topics datasets/ntcir_1_j/test_topics.tsv \
  --output results/ntcir_1_j_bm25.trec \
  --language ja \
  --bm25

評価

$ poetry run ir_measures datasets/ntcir_1_j/test_qrels.txt results/ntcir_1_j_bm25.trec nDCG@10

NTCIR-2 単言語検索(日本語,test)

データセットの入手

NTCIR-2はNTCIR-1の文書コレクションを含むためNTCIR-1の利用申込も必要となる.

  1. NTCIR-1: 情報検索/用語抽出研究用テストコレクション,および,NTCIR-2: 情報検索用テストコレクションから「テストコレクション利用申込書」にしたがって利用申込を行う
  2. NTCIR-1のZipファイルを解凍してMLIR.TGZoriginal_data/NTCIR-1/以下などに展開しておく.
  3. NTCIR-2のZipファイルを解凍してj-docs.tgztopics.tgzrels.tgzoriginal_data/NTCIR-2/以下などに展開しておく.
  4. 以下のファイルを読み込めることをlessコマンドなどで確認しておく(違う場所に展開されている場合にはconfig.yamlファイルの設定を変更しても良い)
  • original_data/NTCIR-1/mlir/ntc1-j1
  • original_data/NTCIR-2/j-docs/ntc2-j1g
  • original_data/NTCIR-2/j-docs/ntc2-j1k
  • original_data/NTCIR-2/topics/topic-j0101-0149
  • original_data/NTCIR-2/rels/rel2_ntc2-j2_0101-0149

データセットの準備

$ poetry run python -m baselines.prepare_dataset \
  ntcir_2_j \
  datasets/ntcir_2_j

索引付け

$ poetry run python -m pyserini.index.lucene \
  --collection JsonCollection \
  --input datasets/ntcir_2_j/docs \
  --language ja \
  --index indexes/ntcir_2_j \
  --generator DefaultLuceneDocumentGenerator \
  --threads 10 \
  --storePositions --storeDocvectors --storeRaw

検索

$ poetry run python -m pyserini.search.lucene \
  --index indexes/ntcir_2_j \
  --topics datasets/ntcir_2_j/test_topics.tsv \
  --output results/ntcir_2_j_bm25.trec \
  --language ja \
  --bm25

評価

$ poetry run ir_measures datasets/ntcir_2_j/test_qrels.txt results/ntcir_2_j_bm25.trec nDCG@10

japanese-ir-baselines's People

Contributors

powir avatar mpkato avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.