Code Monkey home page Code Monkey logo

yinarlingi's Introduction

yinarlingi

Overview

The purpose of yinarlingi is to provide a set of convenience functions for validating Warlpiri dictionary data. Essentially, it pre-configures various functions from the tidylex and tidyverse packages with parameters specific to the Warlpiri dictionary data, so that those within the Warlpiri dictionary project can quickly run and re-run frequently used routines (e.g. data validation, derived views), and also so that these tests can be run in a Continuous Testing/Continuous Deployment environment such as GitLab pipelines:

Yinarlingi is a Warlpiri word for echidna.

Installation

You can install yinarlingi from GitHub with:

# install.packages("devtools")
devtools::install_github("CoEDL/yinarlingi")

Examples

Test that a Warlpiri dictionary entry’s data lines are well-ordered

The Warlpiri dictionary consists of a large plain text file of the form (where \me stands for main entry; see full list of codes):

\me jampaly(pa) (N) (PV): (La,Wi,Y)
\dm spatial: tactile: \edm
\gl sharp, pointed \egl
\rv sharp \erv
\eg
\we Karlangu ka karri jampalypa ngulaju yiri-nyayirni. \[@@]
\et The digging stick is sharp, that is very sharp pointed. \ewe
\eeg
\ant jampilypa, munju \eant
\cf jaarn-karri-mi, lirra jampalypa \ecf
\syn jalkarra, larrilpi, yiri \esyn
\eme
\sse jampaly-pi-nyi (V):
\def xERG cause y to come to be sharp (<jampalypa>) \edef
\gl sharpen, trim to ^point \egl
\rv sharpen \erv
\eg
\we Jampaly-pungulpalu wangkinypa, yangka kuja munju-jarrija. \[@@]
\et They sharpened the stone-axe which had became blunt. \ewe
\we Karlangulu jampalypa-pungu. \[Tiger Jakamarra]
\et They sharpened the points of the digging sticks. \ewe
\eeg
\csl YSL#1336, YSL#313 \ecsl
\syn yiri-ma-ni \esyn
\esse

...

A well-structured Warlpiri entry is defined as a Nearley grammar (see full grammar here), of which a snippet is shown below:

entryBlock       -> "org":? "dm":* "def":? "lat":? "gl":? "rv":? "cm":*
                      (exampleBlock:+ | paradigmExample:+):?
                      crossRefs

We can see here that a semantic domain line dm must come before the gloss line gl. So, the following data (provided in wlp-lexicon_invalid-sequence.txt) clearly does not satisfy this requirement:

\me jampaly(pa) (N) (PV): (La,Wi,Y)
\gl sharp, pointed \egl
\dm spatial: tactile: \edm
...

The yinarlingi test suite uses the test_code1_ordered() function to catch such cases (notice code1_ok is FALSE on the third line):

library(yinarlingi)

# Get local path to the yinarlingi-provided file, 'wlp-lexicon_invalid-sequence.txt'
invalid_lexicon_path <- system.file("extdata/wlp-lexicon_invalid-sequence.txt", package = "yinarlingi")

test_code1_ordered(invalid_lexicon_path) %>%
    knitr::kable() # For pretty display of table
me_start line data code1 code1_ok error
1 : jampaly(pa) (N) (PV): (La,Wi,Y) 1 jampaly(pa) (N) (PV): (La,Wi,Y) me TRUE NA
2 sharp, pointed gl TRUE NA
3 spatial: tactile: dm FALSE Unexpected code1
4 sharp rv NA NA
5 eg NA NA
6 Karlangu ka karri jampalypa ngulaju yiri-nyayirni. [@@] we NA NA

yinarlingi's People

Contributors

erlkinglook avatar fauxneticien avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

erlkinglook

yinarlingi's Issues

Have (Warlpiri) preverb list test match against composed entries

It would be great to broaden the preverb cross-reference check to check for composed entries. That is, it would just be good and correct, and cut down the number of things to fix, if for a \pvl item A in entry B, if there is an entry of either

A + B
A + “-“ + B

then that isn’t an error.

So, for example, in:

\me paji-rni*2* (V):

item

\pvl … maarn-

shouldn’t be an error, because there is an entry:

\me maarn-paji-rni (V): (Y)

I’m hoping that wouldn’t be difficult to add….

Complete docs

  1. Turn wlp-git-workflow Google Sheet into vignette. Put vignette in 'References' section of menu.
  2. Proofread Articles
  3. Add overview paragraph/sentence to Git problem solving vignette
  4. Take out introduction link from Articles section
  5. Draft Introduction vignette (scrape/summarise overview paragraphs from other Article vignettes), add a 'annotated' Table of Contents effectively for Reference and Articles section inside Introduction vignette

First draft of 'complete' onboarding documentation

Milestone for current issue is 'Test run by DN', on 15/08. By then the following docs should be 'complete' in the macro-level sense (we can tweak the micro-level details after feedback from DN).

  • 0. set up
  • 1. main workflow
  • 2. resolving conflicts
  • 3. reverting commits

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.