Giter Club home page Giter Club logo

ming's People

Contributors

iantayler avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lizmat

ming's Issues

Resource Spanish merge-only grammar

I should add an example grammar as a file in resources/ so that users have an example from which to build their knowledge of MGs in general and MinG in particular.

Analyser.p6 script

Make a script to read grammars from a file (or from the resources, like issue #5 ) and parse sentences given by the user.

Procedural parser simply doesn't work.

Its behaviour is pretty erratic. For example, it recognises string where the words aren't even in the lexicon, but seems to fail to recognise all actual sentences in languages.

There is very little difference in code between the parallel and the procedural parser, so the problem can only be in about 20 lines of wrapper code where the parallel parser runs all derivations in @!devq while the procedural one pops a derivation and runs it.

This has very low priority when compared to #1 and #2 .

Recursivity breaks the merge-only parser.

A grammar like this

START=V
juan :: D
come :: =D =D V
pan :: D

works fine. The parser recognises "juan come pan" and correctly determines things like "come come pan" are not in the language.

On the other hand

START=V
juan :: D
come :: =D =D V
pan :: D
mucho :: =D D

not only fails to recognise "juan come mucho pan" as a string in the language, but also fails to recognise "juan come pan". Adding more lexical items can't un-add elements to the language, so this is a weird type of error.

Having alternatives sometimes breaks the parser.

The issue

This issue is best explained by example (partly because I don't know what's the problem behind the scenes: only that certain grammars I've experimented with don't work). The following grammars don't work for the issues mentioned

START=C
(empty) :: =V C
imasentence :: V
comio :: =D =D V
juan :: D

This one recognises juan comio juan properly, but it doesn't recognise imasentence. The same grammar without the lexical item comio does recognise imasentence.

START=C
(empty) :: =V C
imasentence :: C # Pay attention to the difference here.
hay :: =D V 
juan :: D

This one recognises hay juan but not imasentence, even though imasentence is directly specified as a word-sentence (i.e. its feature specification includes only the start category).

START=C
(empty) :: =V C
imasentence :: C
hay :: =D V 
juan :: D
comio :: =D =D V

In this last one nothing works. Not imasentence, not hay juan and not juan comio juan. This can be reproduced rather minimally as

START=V
comio :: =D =D V
hay :: =D V
juan :: D

Which fails to recognise any of the strings in the language.

Some guesses

It's likely that the issue is closely related (or just essentially the same issue) as #1.

The problem only appears when there's alternatives with different feature-specifications. There is no such problem if in the last example we change "hay :: =D V" for "escupe :: =D =D V". So it's possible something is going wrong with Node.children_with_property() or around that part of the code when it decides whether or not it should scan() (it seems to be getting false negatives there). In some cases, the parser favours the deeper alternative (i.e. not recognising word-sentences while properly recognising intransitive sentences), in some other cases, both options fail.

Let's just hope it isn't an asynchrony problem.

EDMG features from string

I should implement a more flexible feature_from_string function that can recognise EDMG features. It's probably a good idea to make it a different function from the one in MinG.pm6, to ensure we're not getting any EDMG features when handling MinG grammars (instead, proper errors should appear).

Parser with head movement and covert movement

Both are mentioned in Torr and Stabler (2016) but were actually some of the first extensions mentioned by Stabler in his early work on MGs.

Both are salient. Covert movement was an important part of Chomsky's (1995) model, and head movement is ubiquitous. While Chomsky assumed head movement happened at PF and could be ignored by syntacticians, what happens at PF crucially cannot be ignored by anyone implementing a parser.

Getting EDMGs from files

I should add an optional line in grammar's headers to specify the type of the grammar. Say TYPE=EDMG. The default should be TYPE=MG for backwards compatibility.

I will probably have to write a separate grammar and converter actions for EDMGs and have grammar_from_text do the following:

  1. Check whether the first line starts with TYPE=\w+
  2. If not, parse the text with your normal MinG::From::Text grammar.
  3. If it does, eliminate that line and parse the rest of the text with the appropriate grammar and converter actions.

This should all be done in a way that can be easily extended if I were to one day add another extension/variation of minimalist grammars to the module.

EDMG basic classes

I should implement MinG::EDMG::Grammar is MinG::Grammar, for which I have to implement MinG::EDMG::LItem is MinG::LItem and MinG::EDMG::Feature is MinG::Feature.

This will add no functionality by itself, but it is the necessary base.

Parser with directional adjunction.

In particular, I'm talking about the type of adjunction mentioned by Torr and Stabler (2016). This is important to note because several types of adjunction have been proposed in the MG literature.

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.