Split an input string (substring) #3677
Unanswered
andrewc-moj
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am quite new to ONNX but can see some real potential with it.
I'm building a custom graph for some simple transformations of data. For one in particular, I am trying to build an ONNX graph to parse (or subset) a string. For example, the string may be a date in the format
yyyy-mm-dd
and I would like to separate this single input into three separate outputsyyyy
,mm
anddd
which I can thencast
into an integer type to do some basic comparisons. I want to avoid operating on unix timestamp integers (representing dates) to ensure that my results match an existing model.I have been scouring the internet and all the available operators to no avail. I'd be surprised if I was the the first to come across this, and would welcome any input. I wondered if
slice
orsplit
could be applied to this kind of problem, but if i'm not mistaken, these separate arrays of inputs rather than single string input, but please let me know if i'm wrong!As an
aideaside, I thought the sklearn classCountVectorizer
would probably implement some parsing of strings (build_tokenizer
?) and I've also found a library calledonnxruntime-extensions
but perhaps reaching the limits of my knowledge.Beta Was this translation helpful? Give feedback.
All reactions