-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[v6] Implement ML-Kit Natural Language #2117
Conversation
[skip ci]
Cool. |
…rebase into @salakar/v6/mlkit
…rebase into @salakar/v6/mlkit
[android] update to latest firebase sdks - previous release broken (#2122) [skip ci]
…eact-native-firebase into @salakar/v6/mlkit # Conflicts: # packages/analytics/android/src/main/AndroidManifest.xml # packages/analytics/android/src/main/java/io/invertase/firebase/analytics/ReactNativeFirebaseAnalyticsModule.java # packages/functions/android/src/main/java/io/invertase/firebase/functions/ReactNativeFirebaseFunctionsModule.java [skip ci]
Hey @RWOverdijk, @sejas, @zhigang1992, @gianpaj, @fungilation and others interested in ML Kit. If you can, please could you provide your feedback/thoughts on the API for the ML Kit Natural Language integration, as I'm currently unsure if this API is clear enough or if anything needs changing? // -- LANGUAGE_LANGUAGE_ID
// --------------------------
firebase.ml().language().identifyLanguage(text): Promise<string>; // -- LANGUAGE_SMART_REPLIES
// --------------------------
firebase.ml().language().newSmartReplyConversation(): SmartReplyConversation;
// -> SmartReplyConversation
// -> destroy(): void;
// -> clear(): void;
// -> getSuggestedReplies(): Promise<SuggestedReply[]>;
// -> addLocalUserMessage(message, timestamp = Date.now()): void;
// -> addRemoteUserMessage(message, timestamp = Date.now(), remoteUserId): void; // -- LANGUAGE_TRANSLATE
// --------------------------
firebase.ml().language().translateText(text, options): Promise<string>;
firebase.ml().language().translateGetAvailableModels(): Promise<Object[]>;
firebase.ml().language().translateDeleteDownloadedModel(languageId: Number): Promise<void>;
firebase.ml().language().translateDownloadRemoteModel(languageId: Number, downloadConditions: Object): Promise<void>; |
@Salakar This reply is me being in the middle of something and the quality might be poor so... Sorry if that's the case 😅 My first question would be, how close is it to the firebase APIs themselves? I'm not working with react-native-camera and its MLKit implementation for detecting faces (ick) and there's almost no resemblance making it hard to debug stuff. Secondly I wonder why every subset is a function. It feels like a lot is being constructed that I wouldn't use (but I might be off). Third, I don't think I dig the translate prefix. Are you translating a delete of a downloaded modal, or are you deleting a downloaded model in the namespace translate? To follow the pattern you'd have to use .translate() and then .deleteDownloadedModel for example.
etc. I hope this helps. |
I don't know anything about these natural language methods in ML kit. Would be great to make an example app like that. |
Preview vid of smart replies working, if you want to sneak peak: https://twitter.com/mikediarmid/status/1128837402481635331 Will come back to the API discussion, getting a basic JS API in place and completing Android / iOS code first - can re-work JS API if needed once native stable. |
[skip ci]
[skip ci]
Codecov Report
@@ Coverage Diff @@
## master #2117 +/- ##
=========================================
Coverage ? 90.37%
=========================================
Files ? 42
Lines ? 934
Branches ? 0
=========================================
Hits ? 844
Misses ? 90
Partials ? 0 |
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #2117 +/- ##
=========================================
Coverage ? 90.37%
=========================================
Files ? 42
Lines ? 934
Branches ? 0
=========================================
Hits ? 844
Misses ? 90
Partials ? 0 |
- Implement ML-Kit Natural Language (invertase#2117) - Includes additional refactor changes across other modules for internals api reworking
Hi @Salakar, Can translation be enabled? I see you have a lot of code in there for it but it's all commented out. Thanks |
- Implement ML-Kit Natural Language (invertase#2117) - Includes additional refactor changes across other modules for internals api reworking
- Implement ML-Kit Natural Language (invertase#2117) - Includes additional refactor changes across other modules for internals api reworking
- Implement ML-Kit Natural Language (invertase#2117) - Includes additional refactor changes across other modules for internals api reworking
[ml-kit-natural-language]
firebase.ml().nlp
firebase.json
supported flagsAdded support for the following flags to support optional models (so they're not all bundled together into your app unless you decide you need them):