Git Product home page Git Product logo

goodpals / middle-english-mouse-dictionary Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 15.07 MB

A browser extension to facilitate the reading of Middle English texts.

Home Page: https://addons.mozilla.org/en-GB/firefox/addon/memd/

License: GNU Affero General Public License v3.0

JavaScript 79.66% CSS 12.10% Shell 0.06% Dart 8.17%
browser-extension cultural-heritage language-tool middle-english old-english medieval-languages medieval-manuscripts medieval-studies

middle-english-mouse-dictionary's Introduction

Middle English Mouse Dictionary Logo

Middle English Mouse Dictionary

The Middle English Mouse Dictionary is a prototype browser extension for Firefox that assists in reading middle english web pages by showing dictionary information about middle english words when they are highlighted or double-clicked. It tracks which words you add to your personal word list for each tab, and displays them in a sidebar, which can be opened from the right-click context menu.

Install the extension here.

Roadmap

At present this is a prototype, written in pure JS to be as simple as possible. In time we intend to:

  • Add additional dictionaries.
  • Implement fuzzy matching to combat orthographic complexity
  • Improve the UI and UX
  • Adapt for Chrome/Safari and Manifest V3
  • Move over to a framework if we deem it suitable
  • Get funding and/or support from institutions

Extension preview

Places you can test this

Acknowledgements

Mousey Friend

middle-english-mouse-dictionary's People

Contributors

alexobviously avatar callumbeaney avatar thebeville avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

middle-english-mouse-dictionary's Issues

parsing semi-regular orthographic patterns

  • Þ, þ : they the same or not?
  • ȝ, 3 : some websites use a 3 (三)
  • "upon" may be e.g. "vpon" consistently
  • U is often subbed with V e.g. auenturus
  • soden may be written ysoden; fried/fryd/fryed may be y-fryed/y-fryd (this is dialectical)
  • odd rules: "each" is written "vch" in some texts, esp. e.g. Gawain
  • variation scope: e.g. "though" --> though, thou(g(e, thoch, þaiȝ, thauthȝ, yogh(e, ȝauȝ, þurȝ (see this article for more info about how to identify patterns in this)

I will update this issue OP as I note/remember new things.

Sidebar functionality suggestions

  1. Button on sidebar words to remove them.
  2. Option to auto-open the sidebar when the user adds a word.
  3. Option to export sidebar content to JSON (this may not be doable given restrictions idk)
  4. If possible, have the sidebar not overlay upon the right-hand of the website, but rather have it inserted at the right edge such that the webpage content is narrowed (again, maybe can't do, idk).
  5. Shortcut for show/hide.

link to external dict resource if user clicks word not in our list

say user clicks a ME word that isn't in our dictionaries
We open a link to an external resource, in a new tab silently in the background.
Not obtrusive, subtly tells users it's not in our dict, but also gives them an alt they can check if they want.

Refactor previous contextMenu. Bad UX.

Keyboard shortcuts

Primarily for opening and closing the sidebar, don't know if there are others.

We will likely want a way to customise the shortcut(s), probably meaning we get a settings page before this.

Each dictionary has source notes

The numerals in Tolkien's vocabulary are useful but there's a problem: what do they point to? Well this so let's add a note for each subsequence source dictionary we parse.

double-click info popup boundary controls

function createPopup(event, info) {
  let popup = document.createElement('div');
  popup.className = 'singleWordInfoPopup';
  popup.innerHTML = info;

  /// TODO: when near the browser window edge this can create an element that partially spills outside of the DOM
  popup.style.position = 'absolute';
  popup.style.left = (event.clientX + window.scrollX - 100) + 'px';
  popup.style.top = (event.clientY + window.scrollY + 15) + 'px';

  document.body.appendChild(popup);

  document.addEventListener('click', function(event) {
    document.removeEventListener('click', this);
    popup.remove();
  });
}

dictionary comprehensiveness

If for now we assume Michigan's MED isn't going to provide access any time soon, we currently suffer from an issue of comprehensiveness (and of the usefulness of entry info). Reading Gawain as a difficult example, many words are missing from our resource. Its usefulness is fundamentally limited for as long as this problem is present.

Here are other reputable & comprehensive dictionaries:

Now for that top one, if the OCR/HOCR available can't do it, I am willing to try my hand at manually plugging entries of it into a JSON (copyright permitting). It's only 700 pages long with around 40 definitions per page so it'd maybe take me 30 or 40 years if I put a movie or two on in the background no biggie

unfortunately the OCR is total ass

Parse reference entries, i.e. _See_ other word

e.g.

 "4345": {
  "variants": ["vithall", "-in"],
  "partOfSpeech": null,
  "entry": "#Vithall#, #-in#, _See_ Withal, -inne."
 },

// in the lookup
 "vithall": ["4345", "4636"],
 "-in": ["4345"],

Store information about pages where words were marked

We want to store the URL of the page where the user finds each word when they add it to their personal persistent word list. You probably want to strip URL params from the URL before you use it.
You likely also want to store the page name, but maybe make a separate record type for these, because there's no point storing redundant information. Maybe also store the favicon if it exists, but optional.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.