Comments (3)
I have reformulated the question so maybe it is more understandable:
I have a language that can basically be in the next form:
ROOT+S36+S35+S34.......+S15+S14.........+S2+S1
but there are restrictions that make the root appear with only some suffixes
and not with all the 36, for instance:
[ ~$[S36 ?* [S20|S12|S2]]; ! S36 can not combine with S20, S12 or S2
[S14 => ?* _ ?* S7 ?*]; ! Every time that S14 appears, S7 must also appear
[[S10 => ?* S12 ?* _ ?* S8] | [S10 => ?* _ ?* S7 ?*]]; ! Every time S10
appears, it must appear either between S12 and S8, or with S7
etc.
and here comes the one I don't know how to express in regex:
! Every time the sequence [?* S36 ?* S20 ?* S5 ?*] appears, it must appear S8
between S20 and S5, like this: [?* S36 ?* S20 ?* S8 ?* S5 ?*]
That is the question, and thanks again......
Original comment by andreschandiaf
on 20 Mar 2015 at 9:34
from foma.
First, this part:
[S10 => ?* S12 ?* _ ?* S8] | [S10 => ?* _ ?* S7 ?*]
should probably read:
[S10 => S12 ?* _ ?* S8 , _ ?* S7]
(that's how two contexts are specified; also you don't need ?* at edges)
The actual question is: when you see ?* S36 ?* S20 ?* S5 ?*, S8 must appear
between S20 and S5. This seems like it's doable without context restriction,
like so:
~$[?* S36 ?* S20 ~$S8 S5 ?*]
Original comment by [email protected]
on 21 Mar 2015 at 3:03
from foma.
Ok, thanks a lot for the two things, great! I see it now!
Original comment by andreschandiaf
on 21 Mar 2015 at 3:10
from foma.
Related Issues (20)
- Left repalce epenthesis rule don't work HOT 1
- For compilation such quiet mode would be good, that printed only errors
- How to represent FST network visually HOT 3
- memory hog in apply.c xxstrdup, string never freed, if used in flookup.
- Context restriction doesn't work with term negation HOT 2
- BOM symbol is not ignored
- Various code validity issues
- fsm_read_prolog() cannot handle quotation marks in symbols HOT 1
- view net blows up if a symbol contains \"
- fomalib.h should be protected against double inclusion
- An FSA that behaves strange HOT 2
- Foma exits 0 - zero - on lexc syntax error
- converted xfsm to foma does not work HOT 5
- r227 build fails on wheezy, precise, saucy HOT 1
- flookup throws error HOT 1
- Looking for advice on unsuccesful compilation on out of memory error HOT 4
- Some help applying rules HOT 3
- _eq function with flag diacritics didn't work
- reduplication restriction
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foma.