タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

stringに関するucqのブックマーク (2)

  • Fuzzy string search

    IntroFuzzy search algorithms (also known as similarity search algorithms) are a basis of spell-checkers and full-fledged search engines like Google or Yandex. For example, these algorithms are used to provide the "Did you mean ..." function. In this article I'll discuss the following concepts, methods and algorithms: Levenshtein distance Damerau-Levenshtein distance Bitap algorithm with modificati

    ucq
    ucq 2011/11/30
  • StringPiece というライブラリの話 - 兼雑記

    例えばこう、ディレクトリの名前とその中のファイル名を / でくぎって結合する関数を書くとします。引数が std::string でも使いたいし const char* でも使いたい、ということで、たいていは void JoinFilePathStr(const string& dir, const string& base, string* out) { out->clear(); out->append(dir); out->push_back('/'); out->append(base); }なんてのを書くんじゃないかと思います。この関数で問題になるのは const char* を渡すと不要な string object が一度できることで、敬虔な C++ 屋さんだと、 void JoinFilePathStr(const string& dir, const char* base,

    StringPiece というライブラリの話 - 兼雑記
    ucq
    ucq 2011/04/29
  • 1