How to look .alpha .model file in model

Nov 21, 2013 at 5:48 PM
Good morning
i want to use CRFSharp in my project. However, my lecturer want to see the .alpha and .model that was generated from encode process(we can't look since it was encrypted). How can i look the weight for every feature ? And another question, what is the extenction file is generated by decode process ? Can i look at that file (not like .alpha and .feature)
Please your answer. Sorry for my bad english
Nov 22, 2013 at 1:31 PM
Edited Nov 25, 2013 at 1:55 AM
Hi fathulnurul,

Let me explain files used by CRFSharp for you.

For ".alpha" file, as you’re mentioned, it saves feature weights and has two formats. The default format saves all features as array in float type. For a specific feature, CRFSharp can get its index by ".feature” file and use the index value to locate the begin position of the feature in ".alpha" file. Another format is to save all non-zero features as <index, value> pairs in order to save space for sparse weight set. So according above format, it's easy for you to dump ".alpha" file into raw text file. If your work isn't very urgent, I can add dump feature into CRFSharp at next week.

For ".model" file, it saves meta-data for the model. The file is a text file, so you can open and check it by any text editor.

For ".feature" file, it's built as double array trie-tree format, however, during encoding process, with "-debug" parameter, CRFSharp will generate a raw feature index file (".feature.raw_text"). So you can check this file to get the beginning of the specific feature's index in weight file.

For your second question, I don't understand it clearly, could you please make the question more clearly?

Zhongkai Fu