This repository has been archived on 2025-08-26. You can view files and clone it, but cannot push or open issues or pull requests.
Files
enginex_bi_series-sherpa-onnx/sherpa-onnx/csrc/fast-clustering-config.h
Fangjun Kuang 70568c2df7 Support Agglomerative clustering. (#1384)
We use the open-source implementation from
https://github.com/cdalitz/hclust-cpp
2024-09-29 23:44:29 +08:00

29 lines
623 B
C++

// sherpa-onnx/csrc/fast-clustering-config.h
//
// Copyright (c) 2024 Xiaomi Corporation
#ifndef SHERPA_ONNX_CSRC_FAST_CLUSTERING_CONFIG_H_
#define SHERPA_ONNX_CSRC_FAST_CLUSTERING_CONFIG_H_
#include <string>
#include "sherpa-onnx/csrc/parse-options.h"
namespace sherpa_onnx {
struct FastClusteringConfig {
// If greater than 0, then threshold is ignored
int32_t num_clusters = -1;
// distance threshold
float threshold = 0.5;
std::string ToString() const;
void Register(ParseOptions *po);
bool Validate() const;
};
} // namespace sherpa_onnx
#endif // SHERPA_ONNX_CSRC_FAST_CLUSTERING_CONFIG_H_