Using Babylon.js with Nuxt3 and Vuetify Together

I had the opportunity to use Babylon.js combined with Nuxt3 and Vuetify, so this is a memo of my experience. The site I built can be viewed at the following URL. https://nakamura196.github.io/nuxt3-babylonjs/ The source code is available below. https://github.com/nakamura196/nuxt3-babylonjs I hope this is helpful when developing an app with this combination.

February 2, 2023 · Updated: February 2, 2023 · 1 min · Nakamura

How to Use IIIF Presentation Validator in a Local Environment

Overview IIIF Presentation Validator is, as the name suggests, a tool for validating IIIF Presentation API manifests. https://presentation-validator.iiif.io/ The following article explains how to use it. This time, I needed to validate manifests in a local environment while creating IIIF Presentation API v3 compliant manifest files, as introduced in the following article. So I installed this tool locally, and here are my notes. Installation Method Instructions are available at the following link, but running Step one did not work. (There was also this Issue filed.) ...

January 25, 2023 · Updated: January 25, 2023 · 2 min · Nakamura

NDL Classical Text OCR Using Google Colab

Overview I created an NDL “Classical Text” OCR application using Google Colab. You can try it at the following URL. https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/NDL古典籍OCRの実行例.ipynb The description of NDL Classical Text OCR is as follows. https://github.com/ndl-lab/ndlkotenocr_cli The notebook was created with reference to @blue0620’s notebook. Thank you! https://twitter.com/blue0620/status/1617888733323485184 In the notebook I created, I added support for additional input formats and a feature to save to Google Drive. How to Use The usage is almost the same as the NDLOCR application. Please refer to the following video. ...

January 25, 2023 · Updated: January 25, 2023 · 1 min · Nakamura

Validating XML Files Using the JPCOAR Schema

Overview JPCOAR Schema publishes XML Schema Definitions in the following repository. Thank you for creating the schema and making the data available. https://github.com/JPCOAR/schema This article is a memo of trying XML file validation using the above schema. (Since this is my first time doing this kind of validation, it may contain inaccurate terminology or information. I apologize.) A Google Colab notebook is also prepared. https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/JPCOARスキーマを用いたxmlファイルのバリデーション.ipynb Preparation Clone the repository ...

January 19, 2023 · Updated: January 19, 2023 · 2 min · Nakamura

Trying the jingtrang Library for RELAX NG Schema: Creating RNG Files

Overview In the following article, I performed XML file validation using jingtrang and RNG files. Since this jingtrang library can create RNG files from XML files, I decided to try it out. I also prepared a Google Colab notebook. https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/jingtrangを試す:作成編.ipynb Creating an RNG File As the source file for creating the RNG file, I prepared the following: <root><title>aaa</title></root> For the above file, execute the following: pytrang base.xml base.rng As a result, the following file was created: ...

January 18, 2023 · Updated: January 18, 2023 · 1 min · Nakamura

Trying the jingtrang Library for RELAX NG Schema: Validation

Overview I had an opportunity to create an XML file conforming to a specific schema, and needed to verify that the XML file matched the schema. To meet this requirement, I tried the jingtrang library for working with RELAX NG schemas, so here are my notes: https://pypi.org/project/jingtrang/ I also prepared a Google Colab notebook: https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/jingtrangを試す.ipynb Trying Validation # ライブラリのインストール pip install jingtrang # rngファイルのダウンロード(tei_allを使用) wget https://raw.githubusercontent.com/nakamura196/test2021/main/tei_all.rng # validation対象のXMLファイルの用意(校異源氏物語テキストのダウンロード) wget https://kouigenjimonogatari.github.io/tei/01.xml Passing Example Running the following produced no output: ...

January 18, 2023 · Updated: January 18, 2023 · 1 min · Nakamura

Trying to Register an Image on OpenSea

Overview I tried registering an image on OpenSea, so this is a memo of my experience. The page for the created item is below. https://opensea.io/assets/ethereum/0x495f947276749ce646f68ac8c248420045cb7b5e/10640296615676167047199551942164304992363478966543389627838835760480269631489 Uploading to OpenSea Uploading images to OpenSea was quite easy. On the other hand, the prior steps of creating MetaMask and OpenSea accounts took some time. There are many articles about these procedures, so please refer to those. Transferring from bitFlyer to MetaMask I sent 0.005 ETH held in bitFlyer to MetaMask. The transfer fee cost 0.005 ETH ($7.72, 990.48 yen). (Expensive… lol) ...

January 16, 2023 · Updated: January 16, 2023 · 2 min · Nakamura

Creating a Customized RNG File Using Roma: Restricting Available TEI Tags

Overview In this article, I will attempt to customize TEI ODD (One Document Does-it-all) using a web application called Roma. https://romabeta.tei-c.org/ For more about TEI ODD, please refer to the official site below. I must admit that I do not fully understand it myself due to limited study. https://wiki.tei-c.org/index.php/ODD However, one use case is that in TEI-based projects, you can restrict the tags used (specifically, those that receive assistance and validation). ...

January 12, 2023 · Updated: January 12, 2023 · 2 min · Nakamura

Introducing an IIIF Viewer in Nuxt3 with SSR

Overview This is a memo on how to introduce an IIIF viewer in Nuxt3 with SSR. Canvas Panel This section covers the introduction of the following viewer. https://iiif-canvas-panel.netlify.app/ Installation npm i @digirati/canvas-panel-web-components Page Please refer to the following. https://github.com/nakamura196/nuxt3-iiif-viewer/blob/main/pages/canvas-panel/index.vue Display Example https://nakamura196.github.io/nuxt3-iiif-viewer/canvas-panel Tify This section covers the introduction of the following viewer. https://github.com/tify-iiif-viewer/tify Installation npm i tify Page Please refer to the following. https://github.com/nakamura196/nuxt3-iiif-viewer/blob/main/pages/tify/index.vue In the case of SSR, a document is not defined. error occurred, so I added the following file to the plugins. ...

December 26, 2022 · Updated: December 26, 2022 · 1 min · Nakamura

Deploying Nuxt 3 on Amazon Lightsail: Using pm2

Introduction When deploying applications developed with Nuxt 3 and similar frameworks, I often use GitHub Pages, Netlify, AWS Amplify, and Serverless Framework + Lambda. However, this time I had the opportunity to deploy using a VPS, so this is a memo. References Specifically, I use Amazon Lightsail and pm2. Creating an Amazon Lightsail Instance Select the Node.js blueprint. Also, since port 3000 is used, open the firewall for it. ...

December 22, 2022 · Updated: December 22, 2022 · 2 min · Nakamura

Trying Out TEI Boilerplate

Overview TEI Boilerplate is described as follows: A lightweight solution for publishing TEI (Text Encoding Initiative) P5 content directly in modern browsers. With TEI Boilerplate, you can serve TEI XML files directly to the web without server-side processing or conversion to HTML. The TEI Boilerplate Demo demonstrates many TEI features rendered by TEI Boilerplate. TEI Boilerplate is not a replacement for the many excellent XSLT solutions for publishing and displaying TEI/XML on the web. It is intended to be a simple, lightweight alternative to more complex XSLT solutions. ...

December 17, 2022 · Updated: December 17, 2022 · 2 min · Nakamura

Omeka S 4.0.0 Release Candidate Has Been Published

Overview The Omeka S 4.0.0 release candidate has been published. https://forum.omeka.org/t/omeka-s-4-0-0-release-candidate/16272 I tried it out on Amazon Lightsail. You can try it at the following URL. http://35.172.220.59/omeka-s/ Installation You can perform the initial setup with the following script. # 変数 OMEKA_PATH=/home/bitnami/htdocs/omeka-s ## ハイフンは含めない DBNAME=omeka_s VERSION=4.0.0-rc ############# set -e mkdir $OMEKA_PATH # Omekaのダウンロード wget https://github.com/omeka/omeka-s/releases/download/v$VERSION/omeka-s-$VERSION.zip unzip -q omeka-s-$VERSION.zip mv omeka-s/* $OMEKA_PATH # .htaccessの移動 mv omeka-s/.htaccess $OMEKA_PATH # 不要なフォルダの削除 rm -rf omeka-s rm omeka-s-$VERSION.zip # 元からあったindex.htmlを削除(もし存在すれば) if [ -e $OMEKA_PATH/index.html ]; then rm $OMEKA_PATH/index.html fi # データベースの作成 cat <<EOF > sql.cnf [client] user = root password = $(cat /home/bitnami/bitnami_application_password) host = localhost EOF mysql --defaults-extra-file=sql.cnf -e "create database $DBNAME"; # Omeka Sの設定 cat <<EOF > $OMEKA_PATH/config/database.ini user = root password = $(cat bitnami_application_password) dbname = $DBNAME host = localhost EOF sudo chown -R daemon:daemon $OMEKA_PATH/files sudo apt install imagemagick -y As of December 15, 2022, the following additional steps were required in addition to the above. ...

December 15, 2022 · Updated: December 15, 2022 · 2 min · Nakamura

Restricting API Access in Omeka S

Omeka S provides an API as a standard feature, allowing resource retrieval from URLs such as the following: https://dev.omeka.org/omeka-s-sandbox/api/items While this is a convenient feature, there may be cases where you do not want to expose the API. In such cases, you can restrict access by adding the following lines to the .htaccess file located directly under the directory where Omeka S is set up. RewriteCond %{REQUEST_URI} ^.*/api RewriteRule ^(.*)$ – [F,L] Specifically, it would look like this: ...

December 12, 2022 · Updated: December 12, 2022 · 1 min · Nakamura

TODO Memo for EC2 Server Setup

This is a TODO memo for setting up a server on EC2. Assign an Elastic IP Add a User with sudo Privileges sudo su useradd nakamura passwd nakamura usermod -G wheel nakamura Set Up Public Key cd /home/nakamura mkdir .ssh touch .ssh/authorized_keys chmod 700 .ssh chmod 600 .ssh/authorized_keys vi .ssh/authorized_keys chown -R nakamura:nakamura .ssh

December 5, 2022 · Updated: December 5, 2022 · 1 min · Nakamura

Investigating Customization Methods for Snorql for Japan Search

Overview This article presents the results of investigating how to customize “Snorql for Japan Search,” which is used by Japan Search. This document will be updated as needed. Please note that it may contain errors. Menu Changing the Page Title snorql_def.js _poweredByLabel: "Cultural Japan", // "Japan Search", Changing the Query Endpoint snorql_def.js _endpoint: "https://ld.cultural.jp/sparql/", //"https://jpsearch.go.jp/rdf/sparql/", Changing the poweredByLink URL snorql_def.js _poweredByLink: "https://cultural.jp/", // "https://jpsearch.go.jp/", Editing Other Footer Sections ...

November 29, 2022 · Updated: November 29, 2022 · 5 min · Nakamura

[Omeka S Module Introduction] IIIF Search Module

Overview IIIF Search is a module for Omeka S that adds the IIIF Content Search API for full-text search. This article introduces the usage of the following module, which includes modifications for handling Japanese text. https://github.com/nakamura196/Omeka-S-module-IiifSearch Installation Clone the source code from GitHub. Replace omeka-s as appropriate for your environment. cd omeka-s/modules git clone https://github.com/nakamura196/Omeka-S-module-IiifSearch.git IiifSearch Note that when installing from GitHub, you need to rename the folder to the target module name as shown above. ...

November 24, 2022 · Updated: November 24, 2022 · 2 min · Nakamura

Running Tesseract on Google Colab (with Japanese Support)

I created a notebook for running Tesseract on Google Colab. It also supports Japanese. We hope this serves as a useful reference. https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/Tesseractを試す.ipynb At the end, I also introduce a flow for converting hocr files to alto format XML files. Specifically, the following tool is used: https://digi.bib.uni-mannheim.de/ocr-fileformat/ We hope this serves as a useful reference.

November 24, 2022 · Updated: November 24, 2022 · 1 min · Nakamura

[Omeka S Module Introduction] "Extract Ocr" - A Module for Performing OCR on PDF Files

Overview This article introduces “Extract Ocr,” an Omeka S module that performs OCR on PDF files. Installation Refer to the following page. https://omeka.org/s/modules/ExtractOcr/ This module requires a command-line tool called pdftohtml. In the instructions below, replace omeka-s as appropriate for your environment. In an environment using AWS Lightsail, it could be installed with the following command: sudo apt install poppler-utils Additionally, you need to edit omeka-s/config/local.config.php. Change the base_uri portion according to your environment. Example: https://omekas.aws.ldas.jp/sandbox/files ...

November 24, 2022 · Updated: November 24, 2022 · 2 min · Nakamura

Workaround for HuggingFace Trainer() Not Starting When Using Vertex AI Workbench

I encountered an issue where HuggingFace’s Trainer() would not start when using Google Cloud’s Vertex AI Workbench. A similar bug was reported on the following page: https://stackoverflow.com/questions/73415068/huggingface-trainer-does-nothing-only-on-vertex-ai-workbench-works-on-colab Initially, I had selected the “PyTorch” environment as shown below, and this is where the bug occurred: As described in the article above, switching to the “Python” environment resolved the issue: Note that when using this environment, you first need to run the following: ...

November 21, 2022 · Updated: November 21, 2022 · 1 min · Nakamura

Installing the Mroonga Search Module (Note: This Did Not Work Successfully)

Overview I attempted to install the Mroonga search module introduced in the following article on AWS Lightsail. https://nakamura196.hatenablog.com/entry/2022/03/07/083004 As a result, the installation did not succeed, but I am documenting it here for future reference. Setting Up Omeka S I set up Omeka S as described in the following article. Installing Mroonga I performed the installation following the instructions on the following page. https://mroonga.org/docs/install/debian.html sudo apt update sudo apt install -y -V apt-transport-https sudo apt install -y -V wget wget https://packages.groonga.org/debian/groonga-apt-source-latest-bullseye.deb sudo apt install -y -V ./groonga-apt-source-latest-bullseye.deb sudo apt update sudo apt install -y -V mariadb-server-10.5-mroonga After executing the above, enter mysql (mariadb). ...

November 21, 2022 · Updated: November 21, 2022 · 2 min · Nakamura