Skip to content
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

feat: [sc-25972] Refine NameRank SDK #515

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Carbon225
Copy link
Collaborator

Copy link

changeset-bot bot commented Dec 31, 2024

🦋 Changeset detected

Latest commit: 8c0a4b4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@namehash/namerank Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Dec 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples.nameguard.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 4, 2025 3:20pm
namegraph.dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 4, 2025 3:20pm
nameguard.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 4, 2025 3:20pm
namehashlabs.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 4, 2025 3:20pm
namekit.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 4, 2025 3:20pm
namerank.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 4, 2025 3:20pm
storybook.namekit.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 4, 2025 3:20pm

Copy link
Member

@lightwalker-eth lightwalker-eth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Carbon225 Hey great to see the updates here. Reviewed in detail and shared feedback 👍 @djstrong FYI

word_count: number;

/** The most likely tokenization of the label */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Can we please document in detail the rules for if this field is defined or not? This will be very helpful!

@@ -9,24 +9,345 @@ export enum LabelStatus {
Unknown = "unknown",
}

// Character and grapheme types can potentially evolve independently.

export enum CharacterType {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Carbon225 It's great to see the added documentation! In my understanding, we should already have most or all of these defined and documented in the NameGuard SDK? We shouldn't duplicate these definitions here. Instead, we should import from the NameGuard SDK wherever relevant. Thank you! @djstrong FYI

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of these are present in NameGuard SDK.

interesting_score: number;

/** Detailed NLP analysis of the name */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please document what can cause this field to be undefined?

tokenizations: Record<string, any>[];
}

export interface NameRankReport {
/** Score indicating the purity/cleanliness of the name */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please document the range of values this could be? Ex: 0 to 1? Inclusive / exclusive?

purity_score: number;

/** Score indicating how interesting/memorable the name is */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please document the range of values this could be? Ex: 0 to 1? Inclusive / exclusive?

top_tokenization?: string[];

/** All possible tokenizations of the label */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really true that this will always have all possible tokenizations? I imagine there's some kind of a limit to how many we might generate / return?

status: LabelStatus;

/** The probability of the label */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's please document in a bit more detail what this "probability" is intended to symbolically represent.

log_probability: number;

/** The number of words in the label */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please document more details about this word_count field? For example, is it sometimes 0 or undefined? What happens if we can't find any words? And when we do return a positive word_count value, how does this value relate to the top_tokenization field?

top_tokenization?: string[];

/** All possible tokenizations of the label */
tokenizations: Record<string, any>[];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's please also define an interface for the value of each of these records. We should avoid the use of any.

@djstrong djstrong force-pushed the jakubkarbowski/sc-25972/refine-namerank-sdk branch from 4164e5b to 74488e8 Compare January 3, 2025 21:53
@vercel vercel bot temporarily deployed to Preview – namegraph.dev January 3, 2025 21:53 Inactive
@vercel vercel bot temporarily deployed to Preview – storybook.namekit.io January 3, 2025 21:53 Inactive
@vercel vercel bot temporarily deployed to Preview – nameguard.io January 3, 2025 21:53 Inactive
@vercel vercel bot temporarily deployed to Preview – examples.nameguard.io January 3, 2025 21:53 Inactive
@vercel vercel bot temporarily deployed to Preview – namehashlabs.org January 3, 2025 21:53 Inactive
@vercel vercel bot temporarily deployed to Preview – storybook.namekit.io January 3, 2025 23:02 Inactive
@vercel vercel bot temporarily deployed to Preview – examples.nameguard.io January 3, 2025 23:02 Inactive
@vercel vercel bot temporarily deployed to Preview – namehashlabs.org January 3, 2025 23:02 Inactive
@vercel vercel bot temporarily deployed to Preview – namegraph.dev January 3, 2025 23:02 Inactive
@vercel vercel bot temporarily deployed to Preview – nameguard.io January 3, 2025 23:02 Inactive
@djstrong
Copy link
Collaborator

djstrong commented Jan 3, 2025

@lightwalker-eth I have addressed all issues.

@notrab
Copy link
Member

notrab commented Jan 4, 2025

@djstrong @lightwalker-eth we should add a changesets entry so the types are released as a minor update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants