chromium/third_party/blink/renderer/platform/language_detection/detect.cc

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

#include "third_party/blink/renderer/platform/language_detection/detect.h"

#include <map>
#include <string>

#include "base/functional/callback.h"
#include "components/language_detection/core/language_detection_model.h"
#include "components/language_detection/core/language_detection_provider.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
#include "third_party/blink/renderer/platform/wtf/hash_traits.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
#include "third_party/blink/renderer/platform/wtf/wtf_size_t.h"

namespace blink {

// TODO(https://crbug.com/354070625): This should be exported from the component
// as a constant.
const unsigned kModelInputMaxChars =;

void DetectLanguage(
    const WTF::String& text,
    base::OnceCallback<void(base::expected<WTF::Vector<LanguagePrediction>,
                                           DetectLanguageError>)> on_complete) {}

}  // namespace blink