-
Notifications
You must be signed in to change notification settings - Fork 4.4k
updated incorrect description of input object #645
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
base: master
Are you sure you want to change the base?
Conversation
Old // responses is an array of following structure: // { // response: string; // context?: string; // } The error obtained in running the code : universal-sentence-encoder:17 Uncaught (in promise) TypeError: e.normalize is not a function at universal-sentence-encoder:17 at c.encode (universal-sentence-encoder:17) at universal-sentence-encoder:17 at Array.map (<anonymous>) at j.tokenizeStrings (universal-sentence-encoder:17) at universal-sentence-encoder:17 at tfjs:17 at e.t.scopedRun (tfjs:17) at e.t.tidy (tfjs:17) at Object.bx [as tidy] (tfjs:17) This error is due to incorrect object definition of "input" On observation of the code of universal-sentence-encoder , we see that --- embed(e) { const n = t.tidy(()=>{ const t = this.tokenizeStrings(e.queries, f) , n = this.tokenizeStrings(e.responses, f); if (null != e.contexts && e.contexts.length !== e.responses.length) throw new Error("The length of response strings and context strings need to match."); const o = e.contexts || []; --- So e.queries and e.contexts show that the input object should be input = { queries: string[], responses: string[], contexts:string[] } So that i what i propose be updated in the readme
updated incorrect description of input object in universal-sentence-encoder
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
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.
Reviewed 1 of 1 files at r1.
Reviewable status: 0 of 1 approvals obtained (waiting on @bhargavyagnik)
universal-sentence-encoder/README.md
line 102 at r1 (raw file):
// queries:string[]; // responses:string[]; // context:string[];
This should be contexts
universal-sentence-encoder/README.md
line 104 at r1 (raw file):
// context:string[]; // } // context is optional, it provides the context string of the answer.
contexts*
Old
// responses is an array of the following structure:
// {
// response: string;
// context?: string;
// }
The error obtained in running the code :
universal-sentence-encoder:17 Uncaught (in promise) TypeError: e.normalize is not a function
at universal-sentence-encoder:17
at c.encode (universal-sentence-encoder:17)
at universal-sentence-encoder:17
at Array.map ()
at j.tokenizeStrings (universal-sentence-encoder:17)
at universal-sentence-encoder:17
at tfjs:17
at e.t.scopedRun (tfjs:17)
at e.t.tidy (tfjs:17)
at Object.bx [as tidy] (tfjs:17)
This error is due to the incorrect object definition of "input"
On observation of the code of universal-sentence-encoder, we see that
So e.queries and e.contexts show that the input object should be
So that is what I propose to be updated in the readme
This change is