Sequence analyzer can't find label mapping


Hi, I just updated to MeTA 1.3.7 (the previous version worked for me on OS X 10.9.5), and all 15 ctests passed, so the installation seems fine. When I tried to do pos-tagging via the ./profile program, I got the error

Running POS-tagging with replace = false
Loading tagging model
libc++abi.dylib: terminating with uncaught exception of type meta::sequence::sequence_analyzer::exception: missing label mapping

I looked in meta/data, and the perceptron tagger folder is there, which includes the file label.mapping. I tried copying the config.toml from the meta root to the build folder, in case the problem was from an old config (After pulling the updated MeTA from git, I didn’t change anything…so according to the config, the [sequence] prefix is “perceptron-tagger”). Any ideas what to do now? Thanks!


If the prefix is perceptron-tagger, then MeTA will look with the prefix ./perceptron-tagger for the model files. This will be meta/build/perceptron-tagger if you run inside build/. If you have the model files in meta/data/, then you should set

prefix = "../data/perceptron-tagger"


Ok, I got it to work…the files in the perceptron-tagger were unzipped. I didn’t have the idea that this would be the problem, but then I looked in the percepton.cpp source and got the idea.

    io::gzifstream file{prefix + "/tagger.model.gz"};
    std::ifstream file{prefix + "/tagger.model"};

I also had to change the config.toml file… `[sequence] prefix = “…/data/perceptron-tagger/” in order for the pos-tagging to work. I thought that the “…/data” would be prepended automatically, as that’s in line 3 of the config. Oops, my bad :smile:

Problem with prefix = "path/to/your/tagger/folder/"

Oh sorry, I just was writing as you must have posted! Thanks!


No problem, glad it is fixed!

It is an interesting point you bring up, though. It would be nice if it still worked even if the files are unzipped and you have zlib. I can make a quick issue for this and hopefully fix it sometime soon.




Hey can you post your config.toml file?

I’m trying to run these commands in the build directory:
./profile …/config.toml aaa.txt --pos
./profile config.toml aaa.txt --pos

Neither of them work. I’m changing both the config.toml files but as soon as I try to add [sequence] or [crf] i get

Unidentified trailing character ‘p’—did you forget a ‘#’? at line 5


Unidentified trailing character ‘[’—did you forget a ‘#’? at line 2



Nvm I’m getting this now

what(): Redefinition of table sequence at line 85