Skip to content

Commit

Permalink
fix: (scala) split on English camelCase words (#2021)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Mar 13, 2023
1 parent 8938d78 commit 68b3f0c
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 13 deletions.
16 changes: 16 additions & 0 deletions dictionaries/scala/cspell-tools.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/streetsidesoftware/cspell/main/packages/cspell-tools/cspell-tools.config.schema.json

targets:
- name: "scala"
sources:
- filename: src/scala.txt
split: legacy
allowedSplitWords:
- ../en_US/en_US.trie
- ../software-terms/dict/softwareTerms.txt
- src/allowed-terms.txt
- filename: src/allowed-terms.txt
format: plaintext
targetDirectory: "./dict"
generateNonStrict: false
compress: false
34 changes: 22 additions & 12 deletions dictionaries/scala/dict/scala.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@

# cspell-tools: keep-case no-split

ByteswapHashing
ClassfileAnnotation
ConcatIterator
ConcatIteratorCell
CustomParallelizable
DeprecatedPredef
DoubleMult
IEEE
IEEEremainder
IntMult
LongMult
MergeableEither
a
abort
aborted
Expand Down Expand Up @@ -39,6 +51,8 @@ and
annotation
ansi
any
any2stringadd
any2stringfmt
apis
append
appended
Expand Down Expand Up @@ -167,7 +181,6 @@ charset
cheap
check
class
classfile
classifier
clear
clearable
Expand Down Expand Up @@ -214,6 +227,7 @@ compute
concat
concurrent
cond
condOpt
conditional
config
conflicted
Expand Down Expand Up @@ -250,7 +264,6 @@ ctrie
curr
current
curried
custom
cyan
d
daemon
Expand Down Expand Up @@ -367,7 +380,6 @@ equality
equals
equiv
erasure
eremainder
err
error
escape
Expand Down Expand Up @@ -455,6 +467,7 @@ future
garbage
gaussian
gcas
gcasRead
gen
generator
generic
Expand Down Expand Up @@ -504,7 +517,6 @@ id
identifier
identity
idle
iee
if
ignorable
ignoring
Expand Down Expand Up @@ -553,7 +565,6 @@ integral
internal
interpolator
interrupt
interruptible
intersect
intersection
interval
Expand Down Expand Up @@ -654,6 +665,7 @@ mangled
manifest
manifests
map
mappable
mapped
mapping
margin
Expand All @@ -667,7 +679,6 @@ max
maximum
mega
merge
mergeable
merged
merger
message
Expand Down Expand Up @@ -701,7 +712,6 @@ monad
monadic
more
msg
mult
multi
multiply
murmur
Expand All @@ -727,6 +737,7 @@ next
nil
nn
no
noTraceSupression
node
noinline
non
Expand Down Expand Up @@ -858,6 +869,7 @@ protect
protected
proxy
psplit
psplitWithSignalling
ptr
publish
publisher
Expand Down Expand Up @@ -947,13 +959,14 @@ rounded
rounding
row
run
runInterruptible
runloop
runnable
runtime
s
same
scala
scalac
scalacCmd
scale
scan
script
Expand Down Expand Up @@ -1050,8 +1063,6 @@ streamed
strict
strictfp
string
stringadd
stringfmt
strings
strip
structural
Expand Down Expand Up @@ -1079,7 +1090,6 @@ suffix
support
suppressed
suppression
supression
surplus
surrogate
suspend
Expand Down Expand Up @@ -1233,7 +1243,7 @@ view
vm
vmap
volatile
vset
vsetDefined
wait
warning
waterline
Expand Down
2 changes: 1 addition & 1 deletion dictionaries/scala/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"./cspell-ext.json": "./cspell-ext.json"
},
"scripts": {
"build": "cspell-tools-cli compile --keep-raw-case --use-legacy-splitter src/scala.txt --no-compress -o ./dict",
"build": "cspell-tools-cli build",
"test": "head -n 1000 src/scala.txt | cspell -v -c ./cspell-ext.json --local=* --languageId=scala stdin",
"prepublishOnly": "echo pre-publish",
"prepare": "yarn run build"
Expand Down
27 changes: 27 additions & 0 deletions dictionaries/scala/src/allowed-terms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ansi
implicits
IEEE
arity
elem
elems
untombed
decached
decr
delim
denum
flatmap
traversable
linux
unicode
gaussian
mappable
unmappable
millis
nanos
repr
traversable
traversables
unaugment
unbatched
unapply
hashcode

0 comments on commit 68b3f0c

Please sign in to comment.