[developers] Problem with the SMAF interface in PET

Christopher Rupp Christopher.Rupp at cl.cam.ac.uk
Mon Nov 17 17:09:10 CET 2008


Hi,

Sorry to bother you again, but I've been chasing the missing SMAF tokeniser
functionality in the current version of PET (going back to revision 498, as far
as I can tell). I've been trying to understand the code that sets the -tok
option and I think that a couple of values may have got switched. I think that
the mapping of the input option name to the one that is internally expect is
mediated but the following structures:

input-modules.h:

enum tokenizer_id {
  TOKENIZER_STRING, TOKENIZER_YY, TOKENIZER_YY_COUNTS
  , TOKENIZER_PIC, TOKENIZER_PIC_COUNTS
  , TOKENIZER_FSR, TOKENIZER_SMAF, TOKENIZER_INVALID
};

input-modules.cpp:

std::string tokenizer_names[] = { 
  "string", "yy", "yy_counts", "pic", "pic_counts", "smaf", "fsr", init()
} ;

Only, the sequence of fsr and smaf have been reversed in one of them. I tried a
trivial change and appeared to get the SMAF interface working again:

cr351 at mcgraw /home/cr351/bigtmp/pet/pet/main 576:svn diff
Index: cheap/input-modules.cpp
===================================================================
--- cheap/input-modules.cpp     (revision 504)
+++ cheap/input-modules.cpp     (working copy)
@@ -30,7 +30,7 @@
 static std::string init();
 /** choose tokenizer */
 std::string tokenizer_names[] = { 
-  "string", "yy", "yy_counts", "pic", "pic_counts", "smaf", "fsr", init()
+  "string", "yy", "yy_counts", "pic", "pic_counts", "fsr", "smaf", init()
 } ;
 //@}

If this is a correct analysis of the problem then the FSR tokeniser mode would 
also
have been malfunctioning, but I don't know if anyone uses that regularly.

If this trivial, change appears correct and sufficient to restore the 
functionality
of these tokeniser options, I'd appreciate it, if it could be incorporated in 
the
next update. Thanks.

Cheers,

C.J.












More information about the developers mailing list