Code Monkey home page Code Monkey logo

jsrealb's People

Contributors

dependabot[bot] avatar lapalme avatar rali-udem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jsrealb's Issues

Errors when running UDregenerator

I tried to run UDregenerator in Colab. When I ran

!node variationsFromText.js file.txt

I met following errors.

*** Creating file.conllu
events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn ./text2ud.py EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -13,
  code: 'EACCES',
  syscall: 'spawn ./text2ud.py',
  path: './text2ud.py',
  spawnargs: [ 'en', 'file.txt' ]
}

What do these information mean? How could I fix with it?

Build size is huge

Build size is huge.
Consider having separate code for English & French?
Would that help?

Some questions about Unregenerator

Guy

I modified the function generateQuestion and generateQuestions in variationsFromText.js as follows.

function generateQuestion(jsr, typ){
    const question=jsr.clone().typ({"int":typ});
    console.log(fmt,typ.toUpperCase()+" ",clean(question.toString()));
    nbQuestions++;
}

function generateQuestions(jsr){
    const subjIdx=jsr.findIndex(d=>d.isA("subj"));

    let jsr1=jsr.clone();
    jsr1.terminal.setProp("n","s");
    jsr1.terminal.setProp("pe",3);

    generateQuestion(jsr1, "was");
    generateQuestion(jsr1, "wad");
    generateQuestion(jsr1, "wod");
    generateQuestion(jsr1, "whe");
    generateQuestion(jsr1, "why");
    generateQuestion(jsr1, "whn");
    generateQuestion(jsr1, "how");
}

In this way, I would like to test if Unregenerator can generate 7 types of questions as above. By modifying variationsFromText.js, I just ignore the answer of each question.

The input sentence is

Cat loves the mouse in the park.

When I ran variationsFromText.js, the results were as follows.

*** Creating file.conllu
*** Wrote  file.conllu
# id   = 1.0
# text = Cat loves the mouse in the park.
# TEXT = Cat loves the mouse in the park. 
# WAS  = What loves the mouse in the park? 
# WAD  = What does cat love in the park? 
# WOD  = Who does cat love in the park? 
# WHE  = Where does cat love the mouse in the park? 
# WHY  = Why does cat love the mouse in the park? 
# WHN  = When does cat love the mouse in the park? 
# HOW  = How does cat love the mouse in the park? 

1 UD dependencies processed
7 questions

From my perspective, in whe manner, in the park should not appear in the question. Could I do something to make this possible? Also, if I add other prepositional phrases in the sentence, the PP will appear in the question. Could I delete PP in the question?

Kunze

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.