Hi -

The name tokenization is provided because biojava can simply look up the 
name of the symbol. For a "token" tokenization you would need to provide a 
custom mapping for your custom alphabet.

Probably the simplist was is to instantiate a 
org.biojava.bio.seq.io.CharacterTokenization and use the bindSymbol method 
to bind Symbols to characters. If you want to register the tokenization 
with the Alphabet then most Biojava alphabets derive from AbstractAlphabet 
which contains the method: putTokenization(String name, SymbolTokenization 
tok)

You could then register your tokenization under the name "token". This is 
only required if other code is going to use the tokenization as after 
creating it you already have a reference to it anyway.

- Mark






zt_2003 <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
05/21/2007 10:07 AM

 
        To:     [email protected]
        cc:     (bcc: Mark Schreiber/GP/Novartis)
        Subject:        [Biojava-l] how to set the "token" parameter?


I had made a custum alphabet und.but when I call the function: 
System.out.println("22222222---"+und.getTokenization("token"));give such 
error: There is no tokenization 'token' defined in alphabet UND. 
und.getTokenization("default")) ot und.getTokenization("name")) is ok. And 
I can't find any api to set the tokenization 'token',how to do it?
_______________________________________________
Biojava-l mailing list  -  [email protected]
http://lists.open-bio.org/mailman/listinfo/biojava-l




_______________________________________________
Biojava-l mailing list  -  [email protected]
http://lists.open-bio.org/mailman/listinfo/biojava-l

Reply via email to