perseids-project / lsj-js Goto Github PK
View Code? Open in Web Editor NEWLiddell-Scott-Jones Greek-English Lexicon in JavaScript
Home Page: https://apps.perseids.org/lsj/
License: MIT License
Liddell-Scott-Jones Greek-English Lexicon in JavaScript
Home Page: https://apps.perseids.org/lsj/
License: MIT License
The application currently works by storing a few big JSON files on the client using localForage. Since it's just JSON, there's no easy way to do queries and searches. We should update to using a different wrapper around IndexedDB. (See https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API for some options).
Instead of src/Whatever.js
we should have src/Whatever/Whatever.js
and src/Whatever/index.js
. The content of Whatever.js
should be the same. index.js
should have the following content:
import Whatever from './Whatever';
export default Whatever;
Google has recommendations for an app to be considered PWA that can be added to a user's home screen (https://developers.google.com/web/fundamentals/app-install-banners/). Auditing the app with lighthouse, it looks like the only thing we're missing are icons of at least 192px and 512px.
I was thinking the logo could be something like the text "LSJ" maybe "Liddell-Scott-Jones Greek-English Lexicon" with the Perseids flower logo in the corner. Plain text might also work.
Hi there,
Fantastic repo, thanks a lot! I'm interested in deploying it on a production server. Could you give some guidance please?
Thanks again!
(not a proper issue but didn't know where to mention it... sorry)
yarn install
generates the following warnings. None of the warnings prevent the application from running, but we should try to get rid of them anyway.
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.14.3".
warning " > [email protected]" has incorrect peer dependency "eslint@^4.19.1".
warning "eslint-config-airbnb > [email protected]" has incorrect peer dependency "eslint@^4.19.1".
warning " > [email protected]" has incorrect peer dependency "eslint@^4.1.1".
warning " > [email protected]" has incorrect peer dependency "eslint-plugin-jsx-a11y@^5.1.1".
warning " > [email protected]" has incorrect peer dependency "eslint@>=1.6.0 <5.0.0".
Once we finish #4 then we can add a full-text search. This should probably be on a separate page, having a simple headword lookup is a good feature for a dictionary.
In some entries there is an '&' markup tag left in the description. E.g. at ἀκμάζω:
ἔχεσθαι **'**tis time to . ., A.Th.97 (lyr.)
This should be rendered as a single apostrophe. I.e. " 'tis time to. . "
When running yarn lint
we get the warning below. It's not causing any problems currently, but we should fix it if possible. We may need to wait for an update of one or more package.
(node:71438) [ESLINT_LEGACY_OBJECT_REST_SPREAD] DeprecationWarning: The 'parserOptions.ecmaFeatures.experimentalObjectRestSpread' option is deprecated. Use 'parserOptions.ecmaVersion' instead. (found in "node_modules/eslint-config-airbnb-base/index.js")
There are some words in vendor/lsj.json
where the latinization (the "l" key in the JSON) has a υ (the Greek upsilon) character mixed in with the Latin characters. We need a script that will go through the JSON and fix it. For an example, see entry ἀκίνδῡν-ος
.
Fixing it is a little more complicated than replacing all υ
characters with u
. The dictionary allows users to type either u
or y
to represent the character υ
. That means that the script will need to transform this
"l": [
"kindυnos"
]
into this
"l": [
"kindunos",
"kindynos"
]
The script will also need to account for words with multiple υ
s.
Here's a Ruby script that replaces all υ
s with u
s. It might be a good starting point.
require 'json'
json = JSON.parse(File.read("vendor/lsj.json"))
json.each do |headword, definition|
definition["l"] = definition["l"].map { |latin| latin.gsub("υ", "u") }
end
File.write("vendor/lsj.json", JSON.pretty_generate(json) + "\n")
When a word starts with two vowels with a rough breathing, it's being Latinized with the "h" in the middle of the two vowels. For example, εἷς
becomes ehis
).
We should write a script that goes through vendor/lsj.json
, finds all of the words that are incorrect, and changes them.
Unfortunately, we can't just look for words where the Latin version is vowel-h-vowel
because there are some weird words where that's the way they should be, like κρᾱἅρα
. I think we need to look to see if the exact match (m
in the JSON) starts with a diphthong with a rough breathing and change the Latin based on that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.