chromium/content/renderer/accessibility/annotations/ax_image_stopwords.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/renderer/accessibility/annotations/ax_image_stopwords.h"

#include <string>
#include <string_view>
#include <vector>

#include "base/containers/contains.h"
#include "base/containers/flat_set.h"
#include "base/i18n/case_conversion.h"
#include "base/i18n/char_iterator.h"
#include "base/no_destructor.h"
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
#include "third_party/icu/source/common/unicode/uchar.h"

namespace content {

namespace {

// List of image stopwords for all languages. See ax_image_stopwords.h
// for information about how image stopwords are defined and how they're
// used.
//
// The stopwords are encoded here as a single long string delimited by
// newlines. This is much more efficient than an array of strings, which
// in practice takes ~6x more storage in the resulting binary.
//
// Current size as of June 2020:
//   369 unique words
//   2542 bytes uncompressed
//   1127 bytes gzipped
const char kImageStopwordsUtf8[] =;

}  // namespace

// static
AXImageStopwords& AXImageStopwords::GetInstance() {}

AXImageStopwords::AXImageStopwords() {}

AXImageStopwords::~AXImageStopwords() = default;

bool AXImageStopwords::IsImageStopword(const char* word_utf8) const {}

}  // namespace content