コード例 #1
0
 private short TagProject(short tag)
 {
     if (smoothTPIndex == null)
     {
         smoothTPIndex = new HashIndex <string>(tagIndex);
     }
     if (tag < 0)
     {
         return(tag);
     }
     else
     {
         string tagStr = smoothTPIndex.Get(tag);
         string binStr = TpPrefix + smoothTP.Project(tagStr);
         return((short)smoothTPIndex.AddToIndex(binStr));
     }
 }
コード例 #2
0
        protected internal virtual void InitTagBins()
        {
            IIndex <string> tagBinIndex = new HashIndex <string>();

            tagBin = new int[tagIndex.Size()];
            for (int t = 0; t < tagBin.Length; t++)
            {
                string tagStr = tagIndex.Get(t);
                string binStr;
                if (tagProjection == null)
                {
                    binStr = tagStr;
                }
                else
                {
                    binStr = tagProjection.Project(tagStr);
                }
                tagBin[t] = tagBinIndex.AddToIndex(binStr);
            }
            numTagBins = tagBinIndex.Size();
        }