diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-05-05 15:55:39 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-05-05 15:55:39 +0200 |
commit | 634b7b7d910ddb20c5af0722de41ef5ccded7358 (patch) | |
tree | d83f5fb36dc4c98035511059202fc51dc676ee54 /skate/verify.go | |
parent | a380bffa5fb0cf20ee84ede6fa590bf38e3675f8 (diff) | |
parent | 134752c2a160986c13d6c2b9428cb2720ed382d0 (diff) | |
download | refcat-634b7b7d910ddb20c5af0722de41ef5ccded7358.tar.gz refcat-634b7b7d910ddb20c5af0722de41ef5ccded7358.zip |
Merge branch 'master' of git.archive.org:martin/cgraph
* 'master' of git.archive.org:martin/cgraph: (24 commits)
update notes
make: run go mod tidy after build
add test for ParseUnstructured
remove stub file
tweaks; move parsing out of command
skate-map: a bit more help output
update docs
set: some tweaks
update README
update deps
start overview docs
update README
update docs
map is a reference type
fix a typo
implement a few flags as mapper middleware
update ignore files
update deps
rename skate-ref-to-release to skate-conv
update README
...
Diffstat (limited to 'skate/verify.go')
-rw-r--r-- | skate/verify.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/skate/verify.go b/skate/verify.go index 914f6a4..e6ab03e 100644 --- a/skate/verify.go +++ b/skate/verify.go @@ -505,7 +505,7 @@ func VerifyMinTitleLength(a, b *Release, minTitleLength int) MatchResult { return MatchResult{StatusStrong, ReasonVersionedDOI} } if len(a.Extra.DataCite.Relations) > 0 || len(b.Extra.DataCite.Relations) > 0 { - getRelatedDOI := func(rel *Release) *set.Set { + getRelatedDOI := func(rel *Release) set.Set { ss := set.New() for _, rel := range rel.Extra.DataCite.Relations { if strings.ToLower(rel.RelatedIdentifierType) != "doi" { @@ -737,7 +737,7 @@ func parsePageString(s string) *ParsedPages { // averageScore take a limited set of authors and calculates pairwise // similarity scores, then returns the average of the best scores; between 0 // and 1. -func averageScore(a, b *set.Set) float64 { +func averageScore(a, b set.Set) float64 { aTrimmed := a.TopK(5) bTrimmed := b.TopK(5) maxScores := make(map[string]float64) // For each a, keep the max. |