Home Articles Books Search About
RSS 日本語

Latest Articles

[Omeka S Theme Development] Updated the Bootstrap 5 Omeka S Theme

[Omeka S Theme Development] Updated the Bootstrap 5 Omeka S Theme

We have published an Omeka S theme using Bootstrap 5 at the following location. https://github.com/ldasjp8/Omeka-S-theme-Bootstrap5 Based on suggestions we received, we added creation date/update date as shown below. Additionally, as Omeka S version 4 has been released as shown below, we made it compatible. https://forum.omeka.org/t/omeka-s-version-4-0-0/16502 However, since there were methods that could not be used in common between version 3 and version 4 during the update, we created separate releases for version 3 and version 4. ...

I Created Digital Archive Tools Centered on IIIF

I Created Digital Archive Tools Centered on IIIF

Overview I created digital archive tools centered on IIIF. You can try them at the following URL. https://nakamura196.github.io/viewer/ Currently, two features are provided: Image comparison using Mirador 3 Canvas number specification tool Image Comparison Using Mirador 3 https://nakamura196.github.io/viewer/input Specify the URLs of the manifest files or Canvas URIs you want to compare. Please try the examples provided. You can compare images as shown below. Canvas Number Specification Tool https://nakamura196.github.io/viewer/canvas ...

Creating RDF from Excel

Creating RDF from Excel

Overview For creating RDF data, I prototyped a Python library that converts data created in Excel to RDF data. It is still a work in progress, but here are my notes. Notebook You can try it from the following notebook. https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/ExcelからRDFデータを作成する.ipynb Source Excel Data Create an Excel file like the following. https://docs.google.com/spreadsheets/d/16SufG69_aZP0u0Kez8bisImGvVb4-z990AEPesdVxLo/edit#gid=0 In the above example, the prefix information used is organized in a sheet named “prefix.” The actual data is entered in a sheet named “target.” Referencing the specifications of Omeka S’s Bulk Import, language labels like “@ja” and types like “^^uri” are specified. ...

Trying to Create a ShEx File

Trying to Create a ShEx File

Overview ShEx is described on Wikipedia as: Shape Expressions is a data modeling language for validating and describing Resource Description Framework Here are my notes from attempting to create a ShEx file. Creating a ShEx File This time, we start with RDF data in data/tmp/merged.ttl. We use shexer to create a ShEx file from the RDF data. pip install shexer Get the list of classes in the RDF data. ...

Obtaining Persistent Identifiers with w3id.org and Redirecting to Snorql

Obtaining Persistent Identifiers with w3id.org and Redirecting to Snorql

Overview I created the following page for publishing RDF data. https://sukilam-educational-metadata.github.io/ In particular, from the following page, you can search RDF data using SPARQL and Snorql. For Snorql, I am using “Snorql for Japan Search”. Please try the query examples at the bottom of the page. https://sukilam-educational-metadata.github.io/snorql/ When publishing this page, I obtained persistent identifiers using w3id.org and set up redirects to Snorql, so this is a personal note for future reference. ...

Bidirectional Interaction Between Vue 3 and Babylon.js (Part 2)

Bidirectional Interaction Between Vue 3 and Babylon.js (Part 2)

Overview In the following article, I created a program for interaction between Vue 3 and Babylon.js. This time, as an advanced version of the above, the mesh to be passed to the scene is specified from Vue. You can check the content at the following link. (There are some parts where meshes are not properly deleted. This is planned to be fixed in the future.) https://youtu.be/-dyQp-QX42I Demo Site https://nakamura196.github.io/nuxt3-babylonjs/10 ...

Loading .glb Files with Nuxt3 x babylon.js

Loading .glb Files with Nuxt3 x babylon.js

Overview I encountered an error when attempting to load a .glb file in Nuxt3 x babylon.js, so this is a memo of how I resolved it. Error Details The following error occurred: Unable to load from ./models/test.glb: importScene of undefined from undefined version: undefined, exporter version: undefinedimportScene has failed JSON parse Solution The issue was resolved by additionally installing the following package: npm install @babylonjs/loaders As a result, I was able to display the model with the following JavaScript file: ...

Bidirectional Interaction Between Vue 3 and Babylon.js

Bidirectional Interaction Between Vue 3 and Babylon.js

Overview I prototyped a program for bidirectional interaction between Vue 3 and Babylon.js. You can check the content at the following link. https://youtube.com/shorts/BIdj-3T2_z8 Demo Site https://nakamura196.github.io/nuxt3-babylonjs/9 Source Code https://github.com/nakamura196/nuxt3-babylonjs/blob/main/pages/9/index.vue Summary We hope this serves as a useful reference.

Changing Annotation Colors in IIIF Curation Viewer

Changing Annotation Colors in IIIF Curation Viewer

Overview I received a request to change the colors of annotations added in IIIF Curation Viewer, so I will introduce one method for doing so. The types of annotation markers are documented at the following link: http://codh.rois.ac.jp/software/iiif-curation-viewer/annotation.html#マーカーの種類 While it is possible to manually or programmatically modify the JSON data, this time I will introduce a method using a GUI. Video I recorded a video of the workflow. Please use it as a reference. The example uses “Night Parade of One Hundred Demons” (held by the University of Tokyo General Library). ...

Web Application for NDL Classical Book OCR Using Hugging Face Space

Web Application for NDL Classical Book OCR Using Hugging Face Space

Overview I created a web application for NDL Classical Book OCR using Hugging Face Space. You can try it at the link below. Upload an image, and after about 1 minute, the OCR result text and JSON data will be displayed. https://huggingface.co/spaces/nakamura196/ndl_kotenseki_ocr The following article was used as a reference for creating this application. https://qiita.com/relu/items/e882e23a9bd07243211b Choosing the Right Tool I have separately prepared a Google Colab tutorial as another environment for trying NDL Classical Book OCR. ...

Running NDL Classical Japanese OCR on Amazon EC2 CPU Environment

Running NDL Classical Japanese OCR on Amazon EC2 CPU Environment

Overview This is a memo of running NDL Classical Japanese OCR on an Amazon EC2 CPU environment. The advantage is that it can be run without preparing an expensive GPU environment, but please note that it takes about 30 seconds to 1 minute per image. The following article was referenced when building this environment. https://qiita.com/relu/items/e882e23a9bd07243211b Instance Select Ubuntu from Quick Start. For the instance type, I recommend t2.medium or higher. Errors occurred with smaller instances. ...

Comparison of Nuxt.js and Next.js

Comparison of Nuxt.js and Next.js

Nuxt.js and Next.js are both JavaScript frameworks built on top of Vue.js and React.js, respectively. Each framework has its own advantages, but here are some points where Nuxt.js is considered superior to Next.js: 1. Advantages of Vue.js: Nuxt.js is based on Vue.js, so it inherits the advantages of Vue.js. Vue.js is appreciated for its simple component structure and gentle learning curve. 2. Directory-based routing: Nuxt.js automatically generates routing based on the directory structure. This eliminates the need for developers to manually configure routing, improving development efficiency. 3. Vuex integration: In Nuxt.js, Vuex (Vue.js’s state management library) is integrated by default. This makes state management easier. 4. Middleware support: In Nuxt.js, middleware can be used to add custom logic to routes and pages. This allows developers to easily customize application behavior. 5. Module system: Nuxt.js has a module system that makes it easy to add community-developed features. This allows developers to improve the extensibility of their applications. However, which framework is better depends on the project requirements, the developer’s skill set, and preferences. Next.js also has features such as the React.js ecosystem, server-side rendering (SSR), and static site generation (SSG), and is supported by many developers. Ultimately, it is important to carefully consider which framework is best suited for your project. ...

What Is a Canonical URL? (canonicalUrl)

What Is a Canonical URL? (canonicalUrl)

A canonical URL is the practice of choosing one “canonical” URL from among different URLs that point to the same content. This is used so that search engines can prevent content duplication and accurately evaluate the importance of web pages without negatively affecting their search rankings. For example, suppose you have the following URLs: 1. http://example.com/page 2. http://www.example.com/page 3. https://example.com/page 4. https://www.example.com/page Even though all of these URLs point to the same content, search engines may treat them as different pages. The canonical URL uses the HTML <link rel="canonical"> tag to tell search engines which URL is the preferred one. ...

Implementing Exact Non-Match Search with Fuse.js (Explained by GPT-4)

Implementing Exact Non-Match Search with Fuse.js (Explained by GPT-4)

Introduction I previously wrote the following article, but GPT-4’s explanation was more useful, so I am sharing it here. How to Implement Exact Non-Match Search in JavaScript Fuse.js is a lightweight fuzzy search library that operates on the client side. However, it is not suitable for the purpose of exact non-match search. Instead, you can easily implement it using JavaScript’s Array methods. Exact Non-Match Search Example The following example uses the filter method to perform an exact non-match search. ...

How to Extract respStmt name Values from TEI/XML Files (Explained by GPT-4)

How to Extract respStmt name Values from TEI/XML Files (Explained by GPT-4)

How to Extract respStmt name Values from TEI/XML Files: Approaches Using BeautifulSoup and ElementTree in Python This article introduces how to extract respStmt name values from TEI/XML files using Python’s BeautifulSoup and ElementTree. Method 1: Using ElementTree First, we extract the respStmt name value using Python’s standard library xml.etree.ElementTree. import xml.etree.ElementTree as ET # Load the XML file tree = ET.parse('your_file.xml') root = tree.getroot() # Define the namespace ns = {'tei': 'http://www.tei-c.org/ns/1.0'} # Extract the respStmt name value name = root.find('.//tei:respStmt/tei:name', ns) # Display the name text if name is not None: print(name.text) else: print("The name tag was not found.") Method 2: Using BeautifulSoup Next, we extract the respStmt name value using BeautifulSoup. First, make sure the beautifulsoup4 and lxml libraries are installed. If they are not installed, you can install them with the following command. ...

Omeka Classic and Omeka S: Feature Comparison (Explained by GPT-4)

Omeka Classic and Omeka S: Feature Comparison (Explained by GPT-4)

Omeka Classic and Omeka S: Feature Comparison (Explained by GPT-4) Target Users: Omeka Classic: Primarily for individuals and small organizations to publish digital collections. Omeka S: Designed to handle multiple projects simultaneously for medium to large organizations. Site Management: Omeka Classic: Creates one website per instance. Omeka S: Can create and manage multiple websites from a single instance. Data Sharing: Omeka Classic: Basically creates independent sites. Omeka S: Supports Linked Data and Semantic Web technologies to facilitate data reuse and sharing. Extensions: ...

Omeka S User Permissions and Access to Private Resources

Omeka S User Permissions and Access to Private Resources

Overview I needed to create a user with viewing permissions for private resources in Omeka S, so this is a memo about that. Omeka S User Permissions Omeka S provides multiple user permission levels. Specifically, they are described on the following page. https://omeka.org/s/docs/user-manual/admin/users/#users Below is a summary with Japanese translations for reference. English Japanese Global Administrator full installation privileges. Global Administrator Full installation privileges Supervisor robust site and content privileges. Supervisor Robust site and content privileges Editor (Content Expert) full privileges for content creation. Editor Full privileges for content creation Reviewer robust content privileges but can only delete own content. Reviewer Robust content privileges but can only delete own content Author create own content. Author Can create own content Researcher search and read privileges only. Researcher Search and read privileges only Access to Private Resources: View Private Resources Module In the table above, Researcher has only search and read privileges, making it one of the possible permission levels to use when requesting review of private resources, for example. (Additionally, permissions can be extended using modules such as the Guest module.) ...

Updating Vocabularies Created with Omeka S Custom Ontology

Updating Vocabularies Created with Omeka S Custom Ontology

Overview Custom Ontology is a module that allows you to add custom vocabularies when standard ontologies such as LOV, schema.org, and W3C are not available. Its usage is introduced below. https://nakamura196.hatenablog.com/entry/2021/07/24/235050 The above article covers vocabulary creation, but does not address how to update existing vocabularies. This article explains how to update existing vocabularies. Creating a Vocabulary As an example, we will create the following vocabulary. https://omekas.aws.ldas.jp/omeka4/ns/myprefix/ Accessing the above URL will download the following TTL file. Here, we have added a custom property called myprefix:mySpecificProperty. ...

Trying Leaflet Marker Cluster with Nuxt 3

Trying Leaflet Marker Cluster with Nuxt 3

I had the opportunity to try Leaflet Marker Cluster with Nuxt 3. The implementation example is as follows. https://nuxt3-demo-nine.vercel.app/map-cluster For this implementation, I referenced the following page. https://codesandbox.io/s/ns238 The source code is at the following URL. https://github.com/nakamura196/nuxt3-demo As of March 2023, it appears to be at the POC (Proof of Concept) stage. I hope this serves as a useful reference.

Memo on Using nbdev

Memo on Using nbdev

Overview When creating Python packages, I use nbdev. https://nbdev.fast.ai/ nbdev is described as follows: Write, test, document, and distribute software packages and technical articles — all in one place, your notebook. This article serves as a memo when using nbdev. Installation The following tutorial page is a helpful reference. https://nbdev.fast.ai/tutorials/tutorial.html Below is a brief overview of the workflow. After installing the related tools, create a GitHub repository, clone it, and then execute the following in the cloned directory. ...