artiya4u / alchemy-2

Automatically exported from code.google.com/p/alchemy-2
Other
0 stars 0 forks source link

Parse error with ! operator #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Weight learning for HMM example (traffic lights) in tutorial
2. Parse error is reported (unexpected '!', expecting ',' or ') in formulas 
containing variables that are followed by the ! operator, e.g. State(s!, t). It 
seems that ! is not recognized as a valid operator.
3. En error (Assertion `index < numItems_' failed) is reported for formula
State(+s1, t) => State(+s2, t+1). 
The same error occurs when a formula 
Token("a",i) => Det(i,i+1) 
is used for statistical parsing example in a tutorial. Again it seems that t+1 
is not recognized as a valid assignment.

What is the expected output? What do you see instead?
This what I get when calling learnwts:
./learnwts -d -i traffic.mln -o traffic-out.mln -t traffic-train.db -ne State

----------------- parameters ----------------
-i = traffic.mln
-cw = 
-ow = 
-m = 0
-a = 0
-p = 0
-ms = 0
-simtp = 0
-seed = -1
-lazy = 0
-lazyNoApprox = 0
-memLimit = -1
-mwsMaxSteps = 1000000
-tries = 1
-targetWt = 0
-hard = 0
-heuristic = 2
-tabuLength = 10
-lazyLowState = 0
-burnMinSteps = 100
-burnMaxSteps = 100
-minSteps = -1
-maxSteps = 1000
-maxSeconds = -1
-subInterval = 2
-numRuns = 3
-numSwap = 10
-numSolutions = 10
-saRatio = 50
-saTemperature = 80
-lateSa = 1
-numChains = 10
-delta = 0.05
-epsilonError = 0.01
-fracConverged = 0.95
-walksatType = 1
-samplesPerTest = 100
-periodic = 0
-infer = 
-d = 1
-g = 0
-o = traffic-out.mln
-t = traffic-train.db
-l = 
-ne = State
-noAddUnitClauses = 0
-multipleDatabases = 0
-withEM = 0
-dNumIter = 100
-dMaxSec = 0
-dMaxMin = 0
-dMaxHour = 0
-dLearningRate = 0.001
-dMomentum = 0
-dNoPW = 0
-dVP = 0
-dNewton = 0
-dCG = 0
-cgLambda = 100
-cgMaxLambda = 1.79769e+308
-cgMinLLChange = 1e-05
-cgNoPrecond = 0
-queryEvidence = 0
-dInitWithLogOdds = 0
-dMwsMaxSubsequentSteps = -1
-gMaxIter = 10000
-gConvThresh = 1e-05
-gNoEqualPredWt = 0
-noPrior = 0
-priorMean = 0
-priorStdDev = -1
-lvg = 0
-ic = 
----------------- end of parameters ----------------
priorStdDev set to (discriminative learning's) default of 2
Parsing MLN and creating domains...
ERROR in traffic.mln7873: line 7, col 7: parse error, unexpected '!', expecting 
',' or ')'
ERROR in traffic.mln7873: line 8, col 5: parse error, unexpected '!', expecting 
',' or ')'
learnwts: ../src/util/array.h:257: Type& Array<Type>::item(const int&) const 
[with Type = std::basic_string<char>]: Assertion `index < numItems_' failed.
Num of errors detected = 2
UNRECOVERABLE ERROR in traffic.mln7873: line 10, col 31
Aborted (core dumped)

What version of the product are you using? On what operating system?
Alchemy-2 (Jan 2013 release) on Ubuntu 12.04.

Please provide any additional information below.
I have attached an .mln file for this example.

Original issue reported on code.google.com by vladimir...@gmail.com on 31 Mar 2014 at 12:22

Attachments: