-
Notifications
You must be signed in to change notification settings - Fork 35
RD-2360 deprecate numCategories, add singleLabel, scoreThreshold opti… #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
95eecf9
RD-2360 deprecate numCategories, add singleLabel, scoreThreshold opti…
iredpath-babel 0f8172c
RD-2360 flesh out javadoc
iredpath-babel c3162e8
RD-2360 fix header comment
iredpath-babel 1aad280
Merge branch 'master' into RD-2360-multilabel-tcat
iredpath-babel d2344b1
Merge branch 'master' into RD-2360-multilabel-tcat
iredpath-babel ef6fe16
RD-2360 slight javadoc change to not mention tcat-specific defaults
iredpath-babel c9f20d2
RD-2360 boolean -> Boolean
iredpath-babel b3a92d9
RD-2360 more doc updates
iredpath-babel d5dce1b
RD-2360 clarification on singleLabel
iredpath-babel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
model/src/main/java/com/basistech/rosette/apimodel/CategoryLabel.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /* | ||
| * Copyright 2018 Basis Technology Corp. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package com.basistech.rosette.apimodel; | ||
|
|
||
| import com.basistech.rosette.annotations.JacksonMixin; | ||
| import lombok.Builder; | ||
| import lombok.Value; | ||
|
|
||
| @Value | ||
| @Builder | ||
| @JacksonMixin | ||
| public class CategoryLabel { | ||
|
|
||
| /** | ||
| * @return the label. | ||
| */ | ||
| private final String label; | ||
|
|
||
| /** | ||
| * @return the confidence score (0.0-1.0) | ||
| */ | ||
| private final Double confidence; | ||
|
|
||
| /** | ||
| * @return the raw score (-INF-INF) | ||
| */ | ||
| private final Double score; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe worthwhile to clarify that the threshold will be ignored if
singleLabelistrue, especially if the single label score falls below the threshold? or did I interpret it wrong?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
turning on
singleLabelautomatically setsscoreThresholdto -INF, but this will get overridden ifscoreThresholdis also specified. I'll add a clarifying note tosingleLabelthat the highest scoring category gets returned regardless of score (although after talking to Hannah we may hold off on exposing the raw score altogether, so this may all be moot)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So not merging yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got the okay from Hannah, so we're sticking with these changes. Just waiting on the verification.