microsoft/onnxruntime-extensions

Public

mirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.4.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

operators/text/string_ecmaregex_replace.hpp

25lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4#pragma once
5
6#include "ocos.h"
7#include "string_utils.h"
8
9struct KernelStringECMARegexReplace : BaseKernel {
10 KernelStringECMARegexReplace(OrtApi api, const OrtKernelInfo* info);
11 void Compute(OrtKernelContext* context);
12
13 protected:
14 bool global_replace_;
15 bool ignore_case_;
16};
17
18struct CustomOpStringECMARegexReplace : Ort::CustomOpBase<CustomOpStringECMARegexReplace, KernelStringECMARegexReplace> {
19 void* CreateKernel(OrtApi api, const OrtKernelInfo* info) const;
20 const char* GetName() const;
21 size_t GetInputTypeCount() const;
22 ONNXTensorElementDataType GetInputType(size_t index) const;
23 size_t GetOutputTypeCount() const;
24 ONNXTensorElementDataType GetOutputType(size_t index) const;
25};
26