(Machine Translation) The TEI Archive

The following is a machine translation of “The TEI Archive” page. https://tei-c.org/Vault/ Text Encoding Initiative (TEI) The TEI Archive Table of Contents Poughkeepsie Principles Sponsoring Organizations 1. TEI Committee Documents 1987-1998 TEI Advisory Committee Analysis and Interpretation Committee Edited Papers Metalanguage and Syntax Issues Committee Steering Committee Technical Review Committee Text Documentation Committee Text Representation Committee 2. Previous Versions of the Guidelines 3. Unnumbered Reports, Articles, Presentations, etc. 4. Songs, Photos, and Other Ephemera TEI Tite Documents Workgroups That Have Completed Their Work Preliminary Drafts of Electronic Text Editing (MLA, 2006) All Available P5 Releases This page contains archival materials from the Text Encoding Initiative. Spanning the first ten years from the Poughkeepsie Conference of 1988 to the beginning of the process of establishing the TEI Consortium in 1999, these materials were collected from fragments across various servers and personal collections, though much of it derives from the excellent Listserv archive maintained by Wendy Plotkin in Chicago. ...

May 5, 2024 · 2 min · Nakamura

Prototyping Digital Archive Tools: Mainly IIIF Usage Support

Overview I created “Digital Archive Tools.” It mainly provides support features for using IIIF (International Image Interoperability Framework). https://nakamura196.github.io/viewer/ Feature 1: Image Comparison with Mirador 3 https://nakamura196.github.io/viewer/input You specify the URLs of the manifest files and the canvas IDs you want to compare, as shown below. As a result, you can compare images as follows. Feature 2: Page Number Specification Tool ! This only supports IIIF Presentation API Version 2. ...

May 2, 2024 · 1 min · Nakamura

Handling the Error: Input value "page" contains a non-scalar value

Overview I addressed the same error in the following article. However, there were cases where the error could not be resolved even after applying the above fix, so I describe additional measures here. Error Details The error details are as follows. In particular, it occurred when jsonapi_search_api_facets was enabled. { "jsonapi": { "version": "1.0", "meta": { "links": { "self": { "href": "http://jsonapi.org/format/1.0/" } } } }, "errors": [ { "title": "Bad Request", "status": "400", "detail": "Input value \"page\" contains a non-scalar value.", "links": { "via": { "href": "http://localhost:61117/web/jsonapi/index/document?page%5Blimit%5D=24&sort=field_id" }, "info": { "href": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1" } }, "source": { "file": "/app/vendor/symfony/http-kernel/HttpKernel.php", "line": 83 }, "meta": { "exception": "Symfony\\Component\\HttpFoundation\\Exception\\BadRequestException: Input value \"page\" contains a non-scalar value. in /app/vendor/symfony/http-foundation/InputBag.php:38\nStack trace:\n#0 /app/web/modules/contrib/facets/src/Plugin/facets/url_processor/QueryString.php(92): Symfony\\Component\\HttpFoundation\\InputBag->get('page')\n#1 /app/web/modules/contrib/facets/src/Plugin/facets/processor/UrlProcessorHandler.php(76): Drupal\\facets\\Plugin\\facets\\url_processor\\QueryString->buildUrls(Object(Drupal\\facets\\Entity\\Facet), Array)\n#2 /app/web/modules/contrib/facets/src/FacetManager/DefaultFacetManager.php(339): ... Solution I modified the buildUrls method in the file mentioned above. ...

April 30, 2024 · 2 min · Nakamura

Bulk Deleting S3 Buckets Using AWS CLI

To list S3 buckets using AWS CLI and delete buckets based on a specific pattern, you can follow the steps below. Here, we explain how to delete buckets whose names start with wby. Prerequisites AWS CLI is installed. Appropriate AWS credentials and access permissions are configured. Step 1: List Buckets First, use the installed AWS CLI to list all S3 buckets: aws s3 ls Step 2: Delete Matching Buckets To delete buckets starting with wby, use a shell script to filter matching buckets and delete them. ...

April 26, 2024 · 2 min · Nakamura

Trying NDLTSR (NDL Table Structure Recognition)

Overview NDLTSR (NDL Table Structure Recognition) is described as follows. A program for recognizing the structure of tables contained in document images is publicly available. By combining it with OCR text data with coordinates, it can be used to structure text data contained in tables. Reference (external link): Addition of new functionality (table structuring) to the Next Generation Digital Library and publication of source code and dataset for the new functionality. This program enables inference of table structures using a machine learning model trained on the NDLTableSet published by the National Diet Library, and also allows retraining with user-provided datasets using the same method as LORE-TSR (external link). ...

April 26, 2024 · 2 min · Nakamura

An Example Analysis of Texts Published in "SAT Daizokyo Text Database 2018"

Overview “SAT Daizokyo Text Database 2018” is described as follows. https://21dzk.l.u-tokyo.ac.jp/SAT2018/master30.php This site is the 2018 version of the digital research environment provided by the SAT Daizokyo Text Database Research Society. Since April 2008, the SAT Daizokyo Text Database Research Society has provided a full-text search service for all 85 volumes of the text portion of the Taisho Shinshu Daizokyo, while enhancing usability through collaboration with various web services and exploring the possibilities of web-based humanities research environments. In SAT2018, we have incorporated new services including collaboration with high-resolution images via IIIF using recently spreading machine learning technology, publication of modern Japanese translations understandable by high school students with linkage to the original text. We have also updated the Chinese characters in the main text to Unicode 10.0 and integrated most functions of the previously published SAT Taisho Image Database. However, this release also provides a framework for collaboration, and going forward, data will be expanded along these lines to further enhance usability. The web services provided by our research society rely on services and support from various stakeholders. For the new services in SAT2018, we received support from the Institute for Research in Humanities regarding machine learning and IIIF integration, and from the Japan Buddhist Federation and Buddhist researchers nationwide for creating modern Japanese translations. We hope that SAT2018 will be useful not only for Buddhist researchers but also for various people interested in Buddhist texts. Furthermore, we would be delighted if the approach to applying technology to cultural materials presented here serves as a model for humanities research. ...

April 25, 2024 · 5 min · Nakamura

Parsing XML Strings in Node.js

Overview To parse XML strings and extract information from them in Node.js, I recommend using the xmldom library. This allows you to work with XML in a way similar to how you manipulate the DOM in a browser. Below is how to set up a function to parse XML and extract elements, focusing on “PAGE” tags, using xmldom. Install the xmldom library: First, install xmldom, which is needed to parse XML strings. npm install xmldom Use xmldom to parse XML and extract the required elements. const { DOMParser } = require('xmldom'); const xmlString = "..."; // DOMParserを使用してXML文字列を解析 const parser = new DOMParser(); const xmlDoc = parser.parseFromString(xmlString, 'text/xml'); // 全てのPAGE要素を取得 const pages = xmlDoc.getElementsByTagName('PAGE'); // 発見されたPAGE要素の数をログに記録(例) console.log('PAGE要素の数:', pages.length); In this example, the basic function logs the XML string, parses it into a document, iterates over each “PAGE” element, and logs its attributes and content. The processing within the loop can be customized based on specific requirements, such as extracting particular details from each page. ...

April 24, 2024 · 1 min · Nakamura

Adding Links to Publications on researchmap

Overview This article explains how to add links to publications and other items on researchmap. On the edit screen for each item, click the “Enter more detailed information” link. Additional input forms such as URL fields will be displayed as shown below. I hope this is helpful when using researchmap.

April 24, 2024 · 1 min · Nakamura

LlamaIndex+GPT4+gradio

Overview I had the opportunity to use LlamaIndex, GPT4, and gradio together, so this is a memo of the process. Since the text used was small in size, the results are accordingly modest, but I prototyped a chatbot for Shibusawa Eiichi. Background I referred to the following article. https://qiita.com/DeepTama/items/1a44ddf6325c2b2cd030 Based on the above, I made modifications to work with libraries as of April 20, 2024. The notebook is published at the following location. ...

April 20, 2024 · 1 min · Nakamura

Creating an Inline Marker Tool with Editor.js

Overview These are notes on how to create an inline marker tool with Editor.js. References The following pages were helpful: https://editorjs.io/creating-an-inline-tool/ https://note.com/eveningmoon_lab/n/n638b9541c47c For writing in TypeScript, the following was helpful: https://github.com/codex-team/editor.js/issues/900 Implementation Implemented with Nuxt. Create the following marker.ts: import type { API } from "@editorjs/editorjs"; class MarkerTool { button: null | HTMLButtonElement; state: boolean; api: API; tag: string; class: string; // 静的メソッドで許可されるHTMLタグと属性を指定 static get sanitize() { return { mark: { class: "cdx-marker", }, }; } // インラインツールとしての振る舞いを定義 static get isInline() { return true; } constructor({ api }: { api: API }) { this.api = api; this.button = null; this.state = false; this.tag = "MARK"; this.class = "cdx-marker"; } // ボタン要素を作成し、SVGアイコンを設定 render() { this.button = document.createElement("button"); this.button.type = "button"; this.button.innerHTML = '<svg width="20" height="18"><path d="M10.458 12.04l2.919 1.686-.781 1.417-.984-.03-.974 1.687H8.674l1.49-2.583-.508-.775.802-1.401zm.546-.952l3.624-6.327a1.597 1.597 0 0 1 2.182-.59 1.632 1.632 0 0 1 .615 2.201l-3.519 6.391-2.902-1.675zm-7.73 3.467h3.465a1.123 1.123 0 1 1 0 2.247H3.273a1.123 1.123 0 1 1 0-2.247z"/></svg>'; this.button.classList.add(this.api.styles.inlineToolButton); return this.button; } // 選択されたテキストを <mark> タグで囲む surround(range: Range) { if (this.state) { this.unwrap(range); return; } this.wrap(range); } // テキストを <mark> タグでラップ wrap(range: Range) { const selectedText = range.extractContents(); const mark = document.createElement(this.tag); mark.className = this.class; // class 属性の追加 mark.appendChild(selectedText); range.insertNode(mark); this.api.selection.expandToTag(mark); } // <mark> タグを解除 unwrap(range: Range) { const mark = this.api.selection.findParentTag(this.tag); const text = range.extractContents(); mark?.remove(); range.insertNode(text); } // ツールの状態をチェック checkState() { const mark = this.api.selection.findParentTag(this.tag, this.class); this.state = !!mark; if (this.state) { this.button?.classList.add("cdx-marker--active"); } else { this.button?.classList.remove("cdx-marker--active"); } } } export default MarkerTool; Call it as follows: ...

April 19, 2024 · 3 min · Nakamura

Changing the max-width of Editor.js

Overview When using Editor.js, large margins appear on the left and right sides by default. This article introduces how to solve this issue. Method The following was helpful. https://github.com/codex-team/editor.js/issues/1328 Specifically, add the following CSS. .ce-block__content, .ce-toolbar__content { max-width: calc(100% - 80px) !important; } .cdx-block { max-width: 100% !important; } The full source code is as follows. <script setup lang="ts"> import EditorJS from "@editorjs/editorjs"; import type { OutputData } from "@editorjs/editorjs"; const blocks = ref<OutputData>({ time: new Date().getTime(), blocks: [ { type: "paragraph", data: { text: "大明副使蒋 承奉すらく 、 欽差督察総制提督浙江等処軍務各衙門 、近年以来、日本各島小民、仮るに買売を以て名と為し 、 しばしば中国辺境を犯し、居民を刼掠するを因となし、旨を奉じて 、 浙江等処承宣布政使司 に議行し、本職に転行して 、 親しく貴国に詣り面議せしめん等の因あり。", }, }, ], }); const editor = () => { new EditorJS({ holder: "editorjs", data: blocks.value, onChange: async (api) => { blocks.value = await api.saver.save(); }, }); }; editor(); </script> <template> <div style="background-color: aliceblue"> <div id="editorjs"></div> <hljson :content="blocks" /> </div> </template> <style> .ce-block__content, .ce-toolbar__content { max-width: calc(100% - 80px) !important; } .cdx-block { max-width: 100% !important; } pre { background-color: #f4f4f4; border: 1px solid #ccc; padding: 10px; } </style> As a result, the left and right margins were reduced as shown below. ...

April 18, 2024 · 1 min · Nakamura

Checking Which Users Belong to a Specific Group on a Linux System

Overview ! This is an answer from ChatGPT 4. There are several ways to check which users belong to a specific group on a Linux system. Here, we explain how to list users belonging to specific groups (in this case, “group1” and “group2”) using the command line. Method 1: Check the /etc/group File On Linux, the /etc/group file stores information about all groups on the system and the users belonging to them. By checking this file, you can identify users in a specific group. ...

April 18, 2024 · 2 min · Nakamura

Released ver 4.0.2 of the Omeka S Theme Using Bootstrap 5

Overview I updated the Omeka S theme using Bootstrap 5. Here I introduce the features added in this update. https://github.com/ldasjp8/Omeka-S-theme-Bootstrap5/releases/tag/4.0.2 New Features Advanced Search Button Link Configuration I added an “Advanced Search URL” option to the theme settings screen. In the example above, a setting is configured to navigate to the “page/advanced” page. Specifically, when clicking the “Advanced Search” button shown below, it navigates to the URL configured here. (If not configured, it navigates to Omeka’s standard advanced search page.) ...

April 17, 2024 · 1 min · Nakamura

Partial Match Search with the Advanced Search Module in Omeka S

Overview This article explains how to perform partial match searches using filters added through the Advanced Search module. In the example above, the query string “toru” matches items with the title “abc title”. Background The Advanced Search module allows you to flexibly configure search conditions and facets. https://omeka.org/s/modules/AdvancedSearch/ In particular, when combined with the “Reference” module, faceted search like the following can be achieved. You can also add filters. However, when performing partial match searches with filters, additional configuration is required. ...

April 17, 2024 · 1 min · Nakamura

Specifying Items to Display in Omeka S Search Results

Overview This article explains how to specify which items to display in search results, as shown below. Configuration In the default settings, the “Heading” displays the title (dcterms:title) and the “Body” displays the description (dcterms:description), as shown below. You can configure which items to display for “Heading” and “Body” respectively by changing the following section in the per-site settings screen. For Advanced Search Even when using the Advanced Search module, these settings are inherited. ...

April 17, 2024 · 2 min · Nakamura

Creating a Custom Search Page in Omeka S

Overview This article introduces how to create a custom search page like the following in Omeka S. Background For creating search pages in Omeka S, I previously introduced a method to limit filter items on the advanced search screen. However, as shown in the overview, there are cases where you want to create a search screen that lists only specific items. For creating such a search page, you can use the “Advanced Search” module. ...

April 17, 2024 · 4 min · Nakamura

Using the API of the Curriculum Guidelines Code Recommendation App

Overview In the following article, I introduced a recommendation app for Japan’s Curriculum Guidelines (Gakushu Shido Yoryo) codes. This time, I introduce how to use the above recommendation app via Gradio’s API. Usage Install the library. pip install gradio_client For example, let’s use the following data. Text School Type Investigate the mechanisms of air guns, water guns, bottle rockets, etc., and notice that as air is compressed and its volume decreases, the repulsive force increases, but water cannot be compressed. Elementary School Since the JSON data is stored in the second element of the result array, it is retrieved with result[1]. ...

April 16, 2024 · 1 min · Nakamura

Prototype of a Course of Study Code Recommendation App

Overview I created a Course of Study code recommendation app, and this is an introduction to it. You can try it on the following Hugging Face Space. It utilizes the Course of Study LOD. https://huggingface.co/spaces/nakamura196/jp-cos Usage Enter any text in the text form. “School Type” is an optional field. Results are displayed on the right side of the screen. Sample inputs are also provided, so please try them out. Information from NHK for School is used. ...

April 16, 2024 · 2 min · Nakamura

Using the researchmap API

Overview I had the opportunity to create a publication list using the researchmap API, so here are my notes. Query Examples for the researchmap API Here are some query examples for the researchmap API. Retrieve a list of papers https://api.researchmap.jp/nakamura.satoru/published_papers Specify a limit (limit usage) https://api.researchmap.jp/nakamura.satoru/published_papers?limit=5 Retrieve results from a specific offset (start usage) https://api.researchmap.jp/nakamura.satoru/published_papers?limit=5&start=6 Specify publication dates (from_date and to_date) https://api.researchmap.jp/nakamura.satoru/published_papers?from_date=2023-04-01&to_date=2024-03-31 Python Usage Example Based on the specified user and publication dates, export published_papers and presentations to Excel. ...

April 15, 2024 · 2 min · Nakamura

Using the Course of Study LOD

Overview The Course of Study LOD is described as follows. The Course of Study LOD publishes the content, codes, and related information of the Course of Study and Education Guidelines published by the Ministry of Education, Culture, Sports, Science and Technology as Linked Open Data (LOD). The target for LOD conversion is the latest version of the code tables for all school types of current and former Courses of Study and Education Guidelines (including partial revisions) that are currently published. ...

April 15, 2024 · 1 min · Nakamura