to_array and to_bytes use-cases #11467
Replies: 1 comment 2 replies
-
Hi @BramVanroy, both these methods generate representations of a document that are designed for consumption by code rather than reading by a human being:
I'm not quite sure what you mean by 'storing the parsed docs in a "one doc per line" format':
|
Beta Was this translation helpful? Give feedback.
-
I am reading through the docs and found
to_array
andto_bytes
. I have encountered to_bytes before, when trying to get a deterministic serialization of a model. Butto_array
is new to me.I understand the differences in how you use them, and that
to_array
requires you (or allows you) to only export certain attributes. But what are the typical use-cases for both? Let's say I want to parse a corpus and store the parsed docs in a "one doc per line" format, would I useto_bytes
orto_array
? (My gut tells meto_bytes
.)In short, what are the use-cases (advantages/disadvantages) of these two methods?
Beta Was this translation helpful? Give feedback.
All reactions