Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/GikoBayesian.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.13 by yoffy, Mon Nov 1 05:18:21 2004 UTC revision 1.14 by yoffy, Mon Nov 1 09:51:57 2004 UTC
# Line 7  unit GikoBayesian; Line 7  unit GikoBayesian;
7  $Id$  $Id$
8  }  }
9    
10    //! 平仮名を辞書に含めない
11    {$DEFINE GIKO_BAYESIAN_NO_HIRAGANA_DIC}
12    
13  interface  interface
14    
15  //==================================================  //==================================================
# Line 483  var Line 486  var
486          const          const
487                  _delim : string = #10;                  _delim : string = #10;
488          begin          begin
489    {$IFDEF GIKO_BAYESIAN_NO_HIRAGANA_DIC}
490                    if mode = ModeWHira then begin
491                            Result := '';
492                            Exit;
493                    end;
494    {$ENDIF}
495                  if Ord( _mode ) >= Ord( ModeWGraph ) then begin                  if Ord( _mode ) >= Ord( ModeWGraph ) then begin
496                          // 日本語                          // 日本語
497                          // スペースを詰める                          // スペースを詰める
# Line 586  begin Line 595  begin
595          words := TStringList.Create;          words := TStringList.Create;
596          try          try
597                  mode := ModeWhite;                  mode := ModeWhite;
598    {$IFNDEF GIKO_BAYESIAN_NO_HIRAGANA_DIC}
599                  wHiraDelimiter.Text := WHIRA_DELIMITER;                  wHiraDelimiter.Text := WHIRA_DELIMITER;
600                  wHiraFinalDelimiter.Text := WHIRA_FINAL_DELIMITER;                  wHiraFinalDelimiter.Text := WHIRA_FINAL_DELIMITER;
601    {$ENDIF}
602                  wKanjiDelimiter.Text := WKANJI_DELIMITER;                  wKanjiDelimiter.Text := WKANJI_DELIMITER;
603                  p                       := PChar( text );                  p                       := PChar( text );
604                  tail    := p + Length( text );                  tail    := p + Length( text );
# Line 653  begin Line 664  begin
664                  end;    // while                  end;    // while
665    
666                  if mode <> ModeWhite then begin                  if mode <> ModeWhite then begin
667                          aWord := Copy( last, 0, p - last );                          SetLength( aWord, p - last );
668                            CopyMemory( PChar( aWord ), last, p - last );
669    
670                          words.Text := changeMode( aWord, mode );                          words.Text := changeMode( aWord, mode );
671    
672                          // 単語登録                          // 単語登録

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26