Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1933)

Issue 7058051: code review 7058051: exp/locale/collate: preparation for adding Search API. ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by mpvl
Modified:
11 years, 3 months ago
Reviewers:
CC:
rsc, golang-dev
Visibility:
Public.

Description

exp/locale/collate: preparation for adding Search API. Also changed the collate API further to how (I believe) it will end up being. It is nicer to separate search from sorting functionality. Collation needs tables that are not needed by search and vice-versa. The common functionality is separated out in the Weigher interface. As this interface is very low-level, it will be moved to a sub package (colltab) in a next CL. The types that will move to this package are Weigher, Elem, and Level. The addition of Elem allows for removing some of the duplicate code between collate and collate/build. This CL also introduces some stubs for a higher-level API for options. The default proposed options are quite complex and require the user to have a decent understanding of Unicode collation. The new options hide a lot of the complexity.

Patch Set 1 #

Patch Set 2 : diff -r 8906cf341c9b https://go.googlecode.com/hg #

Total comments: 2

Patch Set 3 : diff -r 5b5399bc3335 https://go.googlecode.com/hg #

Unified diffs Side-by-side diffs Delta from patch set Stats (+395 lines, -264 lines) Patch
M src/pkg/exp/locale/collate/build/builder.go View 1 1 chunk +3 lines, -3 lines 0 comments Download
M src/pkg/exp/locale/collate/build/table.go View 1 1 chunk +2 lines, -18 lines 0 comments Download
M src/pkg/exp/locale/collate/colelem.go View 1 2 9 chunks +88 lines, -37 lines 0 comments Download
M src/pkg/exp/locale/collate/colelem_test.go View 1 4 chunks +34 lines, -34 lines 0 comments Download
M src/pkg/exp/locale/collate/collate.go View 1 24 chunks +112 lines, -132 lines 0 comments Download
A src/pkg/exp/locale/collate/colltab.go View 1 2 1 chunk +28 lines, -0 lines 0 comments Download
M src/pkg/exp/locale/collate/export.go View 1 2 chunks +5 lines, -6 lines 0 comments Download
M src/pkg/exp/locale/collate/export_test.go View 1 3 chunks +9 lines, -9 lines 0 comments Download
M src/pkg/exp/locale/collate/table.go View 1 8 chunks +107 lines, -9 lines 0 comments Download
M src/pkg/exp/locale/collate/tables.go View 2 chunks +1 line, -10 lines 0 comments Download
M src/pkg/exp/locale/collate/trie.go View 1 2 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 4
mpvl
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg
11 years, 3 months ago (2013-01-07 19:23:17 UTC) #1
rsc
LGTM Sorry for the delay. https://codereview.appspot.com/7058051/diff/2001/src/pkg/exp/locale/collate/colltab.go File src/pkg/exp/locale/collate/colltab.go (right): https://codereview.appspot.com/7058051/diff/2001/src/pkg/exp/locale/collate/colltab.go#newcode7 src/pkg/exp/locale/collate/colltab.go:7: // A type that ...
11 years, 3 months ago (2013-01-18 21:55:56 UTC) #2
mpvl
https://codereview.appspot.com/7058051/diff/2001/src/pkg/exp/locale/collate/colltab.go File src/pkg/exp/locale/collate/colltab.go (right): https://codereview.appspot.com/7058051/diff/2001/src/pkg/exp/locale/collate/colltab.go#newcode7 src/pkg/exp/locale/collate/colltab.go:7: // A type that implements Weigher can be used ...
11 years, 3 months ago (2013-01-23 13:11:19 UTC) #3
mpvl
11 years, 3 months ago (2013-01-23 13:15:57 UTC) #4
*** Submitted as https://code.google.com/p/go/source/detail?r=02d35e52507f ***

exp/locale/collate: preparation for adding Search API. Also changed the collate
API
further to how (I believe) it will end up being.
It is nicer to separate search from sorting functionality. Collation needs
tables that
are not needed by search and vice-versa.  The common functionality is separated
out
in the Weigher interface.  As this interface is very low-level, it will be moved
to
a sub package (colltab) in a next CL.
The types that will move to this package are Weigher, Elem, and Level.  The
addition
of Elem allows for removing some of the duplicate code between collate and
collate/build.
This CL also introduces some stubs for a higher-level API for options. The
default
proposed options are quite complex and require the user to have a decent
understanding
of Unicode collation.  The new options hide a lot of the complexity.

R=rsc
CC=golang-dev
https://codereview.appspot.com/7058051
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b