> For the complete documentation index, see [llms.txt](https://ai4commsci.gitbook.io/formosanbank/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai4commsci.gitbook.io/formosanbank/the-bank-architecture/corpora/glosbe.md).

# Glosbe

## **Overview**

This corpus comes from the crowdsourced online dictionary Glosbe. Currently we have only included Amis, which was (at time of checking) the only reasonably sized dictionary.

***

## Corpus Statistics

|                           | <p>Amis<br>UK</p> |
| ------------------------- | ----------------- |
| Word count                | 91,201            |
| Total audio               | 0                 |
| Transcribed               | 0                 |
| Untranscribed             | 0                 |
| Translated words          |                   |
| English                   | 0                 |
| Mandarin                  | 91,201            |
| Morphologically segmented | 0                 |
| Glossed words             | 0                 |

***

## **Corpus Processing**

The process involves several steps to extract, scrape, clean and format the data:

1. **Extract Common Words**:

```bash
python work/scripts/extract_words.py
```

**Output**: Generates list of most frequent Amis words from reference corpus

2. **Scrape Translations**:

```bash
python work/scripts/scrape_zh.py
```

**Output**: Raw translation pairs saved to JSON

3. **Deduplicate Translations**:

```bash
python work/scripts/dedupe_zh.py
```

**Output**: Cleaned JSON file with unique translation pairs

4. **Convert to XML Format**:

```bash
python work/scripts/make_xml.py
```

**Output**: FormosanBank XML format in `Final_XML/amis_glosbe.xml`

5. **Validate XML** (Optional):

```bash
python work/scripts/validate.py
```

**Output**: Validation report of XML structure

6. **Clean XML** (Optional):

```bash
   python work/scripts/clean_xml.py
```

**Output**: Standardized punctuation and cleaned XML

7. **Update XML**

Replace-all:

->

8. **Add Traditional Chinese**

This was done semi-automatically. It's not easily reproducible.

9. **Standardize**

It looks like it's Ortho94 (mostly). But conversion won't change anything relevant.

```bash
   python ../FormosanBank/QC/utilities/standardize.py --corpora_path Final_XML --copy
```

9. **Remove some colons**

Colons are used for introducing quotes in this text. However, colons have a specific meaning in the standard orthography, so replace with commas.

```bash
   python work/scripts/fix_colon_quote.py
```

10. **Add IPA**

The IPA for Ortho94 is different from Ortho113, so go ahead and use it for the "original" tier.

```bash
   python ../FormosanBank/QC/utilities/add_phonology.py --corpora_path Final_XML --orthography Ortho94
```

***

## **Corpus Notes**

Because this is a crowd-sourced dictionary, its accuracy is uncertain.

***

## **Access Details**

* The repo containing the Glosbe corpus in FormosanBank as well as the code to reconstruct the corpus can be found [here](https://github.com/FormosanBank/FormosanBank/tree/main/Corpora/Glosbe).

***

## **Copyright**

CC-BY-SA

***

## Citation

In accordance with our [Terms of Use](/formosanbank/additional-resources/terms-of-use.md), if you use this corpus or any product derived from this corpus in any publication, you must cite both FormosanBank and:

* Glosbe. (n.d.). Glosbe dictionary. <https://glosbe.com>. Accessed 2025.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ai4commsci.gitbook.io/formosanbank/the-bank-architecture/corpora/glosbe.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
