Re: [go-nuts] x/text: Interest in Unicode text segmentation?

2020-04-16 Thread mpvl
pdates. >> >> On Wed, 15 Apr 2020 at 23:56 Ian Lance Taylor wrote: >> >>> [ +mpvl ] >>> >>> On Wed, Apr 15, 2020 at 2:30 PM Matt Sherman >>> wrote: >>> > >>> > Hi, I am working on a tokenizer based on Unicode text segment

Re: [go-nuts] x/text: Interest in Unicode text segmentation?

2020-04-16 Thread mpvl
Yes that would be interesting. Especially if it can be generated from the Unicode raw data upon updates. On Wed, 15 Apr 2020 at 23:56 Ian Lance Taylor wrote: > [ +mpvl ] > > On Wed, Apr 15, 2020 at 2:30 PM Matt Sherman wrote: > > > > Hi, I am working on a tokenizer

Re: [go-nuts] Re: golang.org/x/text/language does not match-Latn (Serbian in a Latin script) with hr (Croatian) as it documents that it should

2019-03-02 Thread mpvl
Yes, languages are fluid and these definitions change regularly. I’m not sure we should keep updating the blog as it will be a maintenance burden. I doubt this will be the last time things will change. At most add a caveat that these definitions will change over time. On Fri, 1 Mar 2019 at 10:16

Re: [go-nuts] Wordbreak and word extraction in Go?

2016-09-22 Thread mpvl
> against the text repository for this. > > I'd ask mpvl (CC'ed). > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+u

Re: [go-nuts] Status of golang.org/x/text/currency (github.com/golang/text)?

2016-08-04 Thread mpvl
Hi Johan, I do plan to provide some kind functionality of this nature, I'm just not quite sure yet how. It could either be: - the API as proposed - returning an interface{} value of the underlying amount that the user would need to cast to the appropriate type, - returning some Number

Re: [go-nuts] Re: x/text/runes: How can i replace LF by CRLF ?

2016-06-28 Thread mpvl
On Tue, Jun 28, 2016 at 12:36 PM, mhhcbon wrote: > > > This does not work in cases where someone want to use a Transformer in > a streaming context (e.g. to create a Reader or Writer or to include the > Transform in a Chain). > > This really is what i was looking to implement, somehow, > > src ->

Re: [go-nuts] Re: x/text/runes: How can i replace LF by CRLF ?

2016-06-28 Thread mpvl
This does not work in cases where someone want to use a Transformer in a streaming context (e.g. to create a Reader or Writer or to include the Transform in a Chain). It may we useful to add something like strings.Replacer in runes as well. Alternatively, I have once implemented a generic rewrite

Re: [go-nuts] Race in text/collate?

2016-06-28 Thread mpvl
The Buffer is to avoid allocations, not to work around a stateless Collator. This could be clarified perhaps. On Mon, Jun 13, 2016 at 8:52 PM, Sugu Sougoumarane wrote: > I think the Go norm of assuming that things are not thread-safe unless > stated otherwise makes sense. > In this particular ca

Re: [go-nuts] golang.org/x/text/transform.Chain is not thread safe

2016-06-23 Thread mpvl
On Tue, Jun 21, 2016 at 5:56 AM, Ian Lance Taylor wrote: > On Mon, Jun 20, 2016 at 5:57 PM, Bryan Reynaert wrote: > > > > the following code panics with: runtime error: slice bounds out of range > > > > > > var testTransform = transform.Chain(norm.NFD, norm.NFC) > > > > func main() { > > for i :

Re: [go-nuts] Race in text/collate?

2016-06-13 Thread mpvl
A single collator instance is NOT safe for concurrent use. The buffers are only used to store the keys, but a Collator has some scratch buffers that are used to avoid allocation. I suggest using a new Collator per goroutine, if possible. On Sun, Jun 12, 2016 at 7:32 PM, 'Sugu Sougoumarane' via g