michael@0: // Copyright 2013 Google Inc. All Rights Reserved. michael@0: // michael@0: // Licensed under the Apache License, Version 2.0 (the "License"); michael@0: // you may not use this file except in compliance with the License. michael@0: // You may obtain a copy of the License at michael@0: // michael@0: // http://www.apache.org/licenses/LICENSE-2.0 michael@0: // michael@0: // Unless required by applicable law or agreed to in writing, software michael@0: // distributed under the License is distributed on an "AS IS" BASIS, michael@0: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. michael@0: // See the License for the specific language governing permissions and michael@0: // limitations under the License. michael@0: michael@0: // michael@0: // Author: dsites@google.com (Dick Sites) michael@0: // michael@0: // Produces debugging output for CLD2. See debug_empty.h for suppressing this. michael@0: michael@0: michael@0: #ifndef I18N_ENCODINGS_CLD2_INTERNAL_DEBUG_H_ michael@0: #define I18N_ENCODINGS_CLD2_INTERNAL_DEBUG_H_ michael@0: michael@0: #include michael@0: #include "scoreonescriptspan.h" michael@0: michael@0: namespace CLD2 { michael@0: michael@0: // For showing one chunk michael@0: void CLD2_Debug(const char* text, michael@0: int lo_offset, michael@0: int hi_offset, michael@0: bool more_to_come, bool score_cjk, michael@0: const ScoringHitBuffer* hitbuffer, michael@0: const ScoringContext* scoringcontext, michael@0: const ChunkSpan* cspan, michael@0: const ChunkSummary* chunksummary); michael@0: michael@0: // For showing all chunks michael@0: void CLD2_Debug2(const char* text, michael@0: bool more_to_come, bool score_cjk, michael@0: const ScoringHitBuffer* hitbuffer, michael@0: const ScoringContext* scoringcontext, michael@0: const SummaryBuffer* summarybuffer); michael@0: michael@0: std::string GetPlainEscapedText(const std::string& txt); michael@0: std::string GetHtmlEscapedText(const std::string& txt); michael@0: std::string GetColorHtmlEscapedText(Language lang, const std::string& txt); michael@0: std::string GetLangColorHtmlEscapedText(Language lang, const std::string& txt); michael@0: michael@0: void DumpResultChunkVector(FILE* f, const char* src, michael@0: ResultChunkVector* resultchunkvector); michael@0: michael@0: michael@0: } // End namespace CLD2 michael@0: michael@0: #endif // I18N_ENCODINGS_CLD2_INTERNAL_DEBUG_H_ michael@0: