Code Monkey home page Code Monkey logo

capr's People

Contributors

julienbaley avatar knightss27 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

capr's Issues

Template Alignment

Currently I am attempting to replace

#align_by_structure(par, segments='tokens', ref='cogids', structure='structure')

with

capr/burmish-pipeline.py

Lines 42 to 47 in ad2bfd8

template_alignment(alms,
ref='cogids',
template='imMnNct', ### This is what is listed as the 'template' default in the old `align_by_structure` method.
structure = 'structure',
fuzzy=True,
segments='tokens')

though I am unsure what template should be used.

Running this currently throws:

Traceback (most recent call last):
  File "/root/calc-pipeline/seth/burmish-pipeline.py", line 42, in <module>
    template_alignment(alms,
  File "/usr/local/lib/python3.9/dist-packages/lingrex/align.py", line 190, in template_alignment
    [
  File "/usr/local/lib/python3.9/dist-packages/lingrex/align.py", line 191, in <listcomp>
    align_to_template(alm, struc, template, gap=gap)
  File "/usr/local/lib/python3.9/dist-packages/lingrex/align.py", line 42, in align_to_template
    raise ValueError(
ValueError: sequence ['ɲ̊', 'ɑ̃', 'u', '∼'] and structure ['i', 'n', 'N', 'c', 't'] have different length

Which is expected given we likely have a bad template.

@LinguList

Missing Libraries in Installation

@knightss27, this looks like really great work to me. Was it your idea to use node for the editing process? This runs very smoothly as far as I can tell by now.

What I would like to mention is that the current package misses a list of required packages, a requirements.txt file. When trying to check the node and the dev-mode, using flask, I had to install another flask package that was not mentioned.

To avoid this, I suggest you make a virtual environment with Python and test with this environment. If all works, you then make pip freeze > requirements.txt. In this way, I can make a fresh environment later and type pip install -r requirements.txt and it will run without problems (provided foma is installed).

Pinning not working

When I move things to the pin section they don't stick. Might be a browser specific issue.

Finishing up checklist.

  • Download button
  • Add headwords
  • Refishing status
  • Board scrolling overflow
  • Passing FST compiler errors to interface
  • Mysterious missing stuff from FST output
  • Write README for development / project structure / how to use
  • Investigate packaging in foma (or at least providing good instructions)

Refishing loses alphabetization.

Refishing after working on boards often generates new boards that are not alphabetically ordered (as expected).
Unsure where this comes from, obviously from the refish-board route, though possible it should just be ordered by the front-end.

Example of *baX out of order after refishing.
image

Short description of workflow

Maybe, I find this already in the code, but a short README that runs me through things I need to do in order to set some server up for somebody, or to check things, etc., what I need to do before using the front-end, etc. would be helpful. I'd then run it as a testing dummy, and give feedback on how clear it is. If you have this already, can you point me to it?

Missing items from FST output.

Generating FST outputs for comparison often leaves empty table cells where it should be filled.
This is not a front-end issue, but one with the compare-fst route.

See an example here:
image

Exporting to PDF.

One really ought to be able to export to PDF in the form of an etymological dictionary, as was originally planned.
This code likely already exists to some extent, or at the very least should not be too hard to recreate.

Old dead ish still hanging around

My understanding is that a dead fish should only appear if, according to the current transducers, one of the items on that column cannot be reconstructed to proto-Burmish. So, if a column only has one item, then it shouldn't have a dead fish on it. But there are currently lots of those examples. So, I would suggest that as part of the refishing process all the old fishes (whether dead or alive) are first removed, and then assigned afresh.

Docker instructions for beginners

I tried following the instructions to install capr via Docker. I haven't really worked with Docker before (which is probably weird for the use case of somebody installing capr on a server :p), so here are some of the points I ran into. Maybe by documenting it clearer it could be easier for a non-technical person to install the software:

  • You refer to the installation instructions of Docker Desktop and Docker Engine, maybe explain what the difference is, or which one to choose, if you haven't worked with Docker before? I went with Docker Engine, also good to note that on the Engine installation page you have to go to the heading Server to get the most straightforward instructions: https://docs.docker.com/engine/install/
  • The docker commands mentioned have to be run with sudo, or user has to be in the group docker, at least on my Ubuntu machine.
  • On my Ubuntu machine, docker compose didn't work. I had to install the package docker-compose and then issue docker-compose build instead.
  • When running docker-compose up, I got the following error: ERROR: for capr_caddy_1 Cannot start service caddy: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /Caddyfile:/etc/caddy/Caddyfile (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type. I think the $PWD variable in the configuration file was not handled correctly. It started working when I changed $PWD to the explicit path in docker-compose.yml in the line $PWD:/etc/caddy/Caddyfile.

After these steps, capr worked!

Question on Running in Dev Mode

@knightss27, I am sorry to bother you, but while I can load the two server instances both for the instance that serves the JSON and the one that provides the GUI, I cannot have them communicate with each other due to violations against cross-server accesses.

The instructions tell me to load the two instances (flaks and node) independently. So flask serves at localhost:5000 or similar and node serves at localhost:8080 or similar. As a result, the node server now cannot access the flask server, which according to the application is expected to serve at /api/refish-board (for example).

So my question is: what am I doing wrong, or how do I combine both server instances here?

And my apologies in advance if this question is stupid and there is just a very simple solution I did not know about.

Can't get Lashi to load

The Lashi transducer is now in place and there are no error messages, but I can't get any Lashi data to load. I wonder if somehow in the refishing process in the back end it isn't looking for Lashi.

Associatinig two colums without merging them (assigning 'root ids')

It can sometimes happen that we can be sure two things aren't exact cognates, but still think they are utimately related. (For example we have two words for tiger *gla and *la, and the Achange word for 'song' (something like siang) is probably related to the Burmese si-khrang (maybe as a loan). So, it would be good to be able to associate two colums without them going into the transducers as one crossid.

Search by meaning

When I find something an incorrect cognate assignment in the transducers it is proving very hard to track down. So, afterall search by meaning would be useful. (Although not as necessary if the alphabetization of proto-forms were fixed).

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.