日本語
krm_ndl

krm_ndl #

This file compiles links to the images of the Kanchi-in manuscript of the Ruiju Myōgishō that are publicly available in the National Diet Library Digital Collections.

This data cross-references the locations within the Kanchi-in manuscript of the Ruiju Myōgishō with their corresponding URLs in the National Diet Library Digital Collections. The file name is KRM_ndl.tsv.

This data indicates the volume name, radical character, Kazama edition page number, Tenri edition page number, and the URL for the National Diet Library Digital Collections.

Next, a sample of the beginning of the data is shown below.

BookRadicalKazamaTenriNDL_url
仏上123https://dl.ndl.go.jp/info:ndljp/pid/2586891/6
仏上224https://dl.ndl.go.jp/info:ndljp/pid/2586891/7

Integration with krm_main #

To integrate with krm_main, you can ask the following questions using generative AI tools like ChatGPT or Gemini to get appropriate answers. While the instructions here are to use Excel, if you wish to process the data with Python, simply replace Excel with Python.

Below are examples of questions and answers for ChatGPT.

Questions #

How can I join the krm_main.tsv and krm_ndl.tsv files in Excel using the kazama_location column in krm_main.tsv and the Kazama column in krm_ndl.tsv? Please also include the following mapping:

  • “仏上” → “K01”
  • “仏中” → “K02”
  • “仏下本” → “K03”
  • “仏下末” → “K04”
  • “法上” → “K05”
  • “法中” → “K06”
  • “法下” → “K07”
  • “僧上” → “K08”
  • “僧中” → “K09”
  • “僧下” → “K10”

Here are the sample data for the files:

Sample krm_main.tsv: #

entry_idhanzi_idkazama_locationtenri_locationvolume_nameradical_namevolume_radical_indexhanzi_entryoriginal_entrydefinition
F00001S00001K01001310Ta023310仏上v1#1音仁(LV)「ニン」 ヒト(HL) ワレ(LL) サネ マホル ユク
F00002S00002K01001331Ta023331仏上v1#1一/人〇/〇ヒトリ(LH_)
F00003S00004K01001341Ta023341仏上v1#1二/人〇/〇フタリ(HHL)

Sample krm_ndl.tsv: #

BookRadicalKazamaTenriNDL_url
仏上123https://dl.ndl.go.jp/info:ndljp/pid/2586891/6
仏上224https://dl.ndl.go.jp/info:ndljp/pid/2586891/7
仏上325https://dl.ndl.go.jp/info:ndljp/pid/2586891/7

Answers #

To join the krm_main.tsv and krm_ndl.tsv files in Excel using the kazama_location column in krm_main.tsv and the Kazama column in krm_ndl.tsv, follow these steps:

  1. Prepare the Data:

    • Import both the krm_main.tsv and krm_ndl.tsv files into Excel as separate sheets. Name them krm_main and krm_ndl.
  2. Create a Mapping Table:

    • Create a new sheet (for example, named “Mapping”) to include the mapping between kazama_location and Kazama codes. Use the following mapping:
    kazama_locationKazama
    仏上K01
    仏中K02
    仏下本K03
    仏下末K04
    法上K05
    法中K06
    法下K07
    僧上K08
    僧中K09
    僧下K10
  3. Lookup the Kazama Code:

    • In the krm_main sheet, add a new column (e.g., “Kazama Code”).
    • Use the VLOOKUP function to lookup the value in kazama_location and return the corresponding Kazama code from the “Mapping” sheet.

    Enter the following formula in the new column (e.g., G2):

    =VLOOKUP(D2, Mapping!$A$2:$B$11, 2, FALSE)
    
    • D2 is the cell in the kazama_location column in the krm_main sheet.
    • Mapping!$A$2:$B$11 refers to the range in the “Mapping” sheet that contains the kazama_location and Kazama values.
  4. Join the Data:

    • Use VLOOKUP again to join krm_main and krm_ndl based on the Kazama code.
    • For example, in the krm_main sheet, use this formula to retrieve the NDL_url from the krm_ndl sheet:
    =VLOOKUP(G2, krm_ndl!$C$2:$E$100, 3, FALSE)
    
    • G2 is the “Kazama Code” column in the krm_main sheet.
    • krm_ndl!$C$2:$E$100 refers to the range in the krm_ndl sheet that includes the Kazama and NDL_url columns.

Summary #

With this approach, you can:

  • Create a mapping table between kazama_location and Kazama codes.
  • Use VLOOKUP to join krm_main and krm_ndl based on the Kazama code.

This method allows you to efficiently join the data using the mapping and Excel functions.