Click here to Skip to main content
15,896,727 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: By age 25 Pin
kalberts14-May-20 10:09
kalberts14-May-20 10:09 
GeneralRe: By age 25 Pin
CPallini14-May-20 10:24
mveCPallini14-May-20 10:24 
GeneralThought of the Day Pin
OriginalGriff14-May-20 6:11
mveOriginalGriff14-May-20 6:11 
GeneralRe: Thought of the Day Pin
W Balboos, GHB14-May-20 6:47
W Balboos, GHB14-May-20 6:47 
GeneralRe: Thought of the Day Pin
Richard Deeming14-May-20 7:21
mveRichard Deeming14-May-20 7:21 
GeneralRe: Thought of the Day Pin
Daniel Pfeffer14-May-20 9:09
professionalDaniel Pfeffer14-May-20 9:09 
GeneralRe: Thought of the Day Pin
Cp-Coder14-May-20 9:30
Cp-Coder14-May-20 9:30 
GeneralMusings on generalized and context sensitive parsing Pin
honey the codewitch14-May-20 4:37
mvahoney the codewitch14-May-20 4:37 
Usually Generalized parsing algorithms are complicated to implement due to being non-deterministic, but very powerful in that they can parse ambiguous grammars.

I really like GLR parsing because it's an elegant solution to a very complicated problem. It uses a difficult to implement LR parsing mechanism underneath but the G part of it is a relatively simple addition that supercharges the expressive power of the LR parser underneath and allows it to parse ambiguous grammars, like human language.

So when I wrote the Glory GLR parser generator I basically jumped the shark. There's little need for something more expressive as it already accepts any grammar. The only way I can think to improve on the algorithm is to implement a contextful grammar, but there are practical problems with even attempting this.

On contextful parsing

Context-sensitive grammar - Wikipedia[^] - it's not exactly a mathematically solved problem - at least not for every day parsing. The problem is that a computer is a Linear Bounded Automata and those aren't powerful enough to compute every CSG you can throw at it in practical time, but rather only a subset of them can be computed.

Recursively Enumerable Languages like English just aren't practically parsable using traditional means.

My prediction is that a learning system will be how we can parse such languages. We'd use machine learning to apply contextful meaning instead of taking a classic mathematical approach to break down the language linguistically and formally to a machine. At best, we'll partially parse using context-free means, like with GLR, and then work on each of the multiple trees we get back using some form of ML, essentially using context-free parsing to get our basic structures and then applying context using ML.

I believe that latter approach is already taken by some "AI" bot systems out there, like that ill fated microsoft twitter bot that turned into a Nazi. I can't be sure without looking at the code though.

Either way, it's a challenging problem. I'm not sure I'm up for solving it on my own. I don't even have the hardware I'd need to try it for anything real world, nor the man hours and expertise to produce a usable English grammar.
Real programmers use butterflies

GeneralRe: Musings on generalized and context sensitive parsing Pin
Member 1298255814-May-20 8:56
Member 1298255814-May-20 8:56 
GeneralRe: Musings on generalized and context sensitive parsing Pin
honey the codewitch14-May-20 9:31
mvahoney the codewitch14-May-20 9:31 
GeneralRe: Musings on generalized and context sensitive parsing Pin
Member 1298255815-May-20 1:50
Member 1298255815-May-20 1:50 
GeneralRe: Musings on generalized and context sensitive parsing Pin
honey the codewitch15-May-20 5:39
mvahoney the codewitch15-May-20 5:39 
GeneralCcc - solution Pin
The pompey14-May-20 3:17
The pompey14-May-20 3:17 
GeneralRe: Ccc - solution Pin
super14-May-20 3:24
professionalsuper14-May-20 3:24 
GeneralRe: Ccc - solution Pin
The pompey14-May-20 4:01
The pompey14-May-20 4:01 
GeneralRe: Ccc - solution Pin
Richard MacCutchan14-May-20 4:31
mveRichard MacCutchan14-May-20 4:31 
GeneralRe: Ccc - solution Pin
Greg Utas14-May-20 4:41
professionalGreg Utas14-May-20 4:41 
GeneralRe: Ccc - solution Pin
pkfox14-May-20 5:09
professionalpkfox14-May-20 5:09 
GeneralRe: Ccc - solution Pin
The pompey14-May-20 23:36
The pompey14-May-20 23:36 
NewsTWOTD Pin
Mel Padden14-May-20 2:18
Mel Padden14-May-20 2:18 
GeneralRe: TWOTD Pin
OriginalGriff14-May-20 2:32
mveOriginalGriff14-May-20 2:32 
GeneralRe: TWOTD Pin
Jacquers14-May-20 4:52
Jacquers14-May-20 4:52 
GeneralRe: TWOTD Pin
lopatir14-May-20 5:34
lopatir14-May-20 5:34 
GeneralCcc Pin
The pompey13-May-20 23:13
The pompey13-May-20 23:13 
GeneralPre and Post cooking activities are killjoy PinPopular
super13-May-20 23:04
professionalsuper13-May-20 23:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.