This file contains 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
import android.os.Bundle | |
import android.util.Log | |
import androidx.appcompat.app.AppCompatActivity | |
import com.google.firebase.ml.naturallanguage.FirebaseNaturalLanguage | |
import com.google.firebase.ml.naturallanguage.languageid.FirebaseLanguageIdentification | |
import kotlinx.android.synthetic.main.activity_main.* | |
class MainActivity : AppCompatActivity() { | |
private val languageIdentification: FirebaseLanguageIdentification by lazy { |
This file contains 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
import android.os.Bundle | |
import androidx.appcompat.app.AppCompatActivity | |
import com.google.firebase.ml.naturallanguage.FirebaseNaturalLanguage | |
import com.google.firebase.ml.naturallanguage.languageid.FirebaseLanguageIdentification | |
import kotlinx.android.synthetic.main.activity_main.* | |
class MainActivity : AppCompatActivity() { | |
private val languageIdentification: FirebaseLanguageIdentification by lazy { | |
FirebaseNaturalLanguage.getInstance().languageIdentification |
This file contains 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
/** An identified language for the given input text. */ | |
NS_SWIFT_NAME(IdentifiedLanguage) | |
@interface FIRIdentifiedLanguage : NSObject | |
/** The BCP-47 language code for the language. */ | |
@property(nonatomic, readonly, copy) NSString *languageCode; | |
/** The confidence score of the language. */ | |
@property(nonatomic, readonly) float confidence; |
This file contains 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
/** | |
* Identifies possible languages for the given text. | |
* | |
* @param text The input text to use for identifying the language. Inputs longer than 200 characters | |
* are truncated to 200 characters, as longer input does not improve the detection accuracy. | |
* @param completion Handler to call back on the main queue with identified languages or error. | |
*/ | |
- (void)identifyPossibleLanguagesForText:(NSString *)text | |
completion:(FIRIdentifyPossibleLanguagesCallback)completion | |
NS_SWIFT_NAME(identifyPossibleLanguages(for:completion:)); |
This file contains 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
/** | |
* A block that handles a language identification result. | |
* | |
* @param languageCode The identified language code for the text, `FIRMLKitUndeterminedLanguageCode` | |
* if no language was identified or `nil` if there was an error. | |
* @param error The error or `nil`. | |
*/ | |
typedef void (^FIRIdentifyLanguageCallback)(NSString *_Nullable languageCode, | |
NSError *_Nullable error) | |
NS_SWIFT_NAME(IdentifyLanguageCallback); |
This file contains 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
/** | |
* Identifies the main language for the given text. | |
* | |
* @param text The input text to use for identifying the language. Inputs longer than 200 characters | |
* are truncated to 200 characters, as longer input does not improve the detection accuracy. | |
* @param completion Handler to call back on the main queue with the identified language code or | |
* error. | |
*/ | |
- (void)identifyLanguageForText:(NSString *)text | |
completion:(FIRIdentifyLanguageCallback)completion |
This file contains 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
implementation 'com.google.firebase:firebase-ml-natural-language:18.2.0' | |
implementation 'com.google.firebase:firebase-ml-natural-language-language-id-model:18.0.3' |
This file contains 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
// See https://github.com/dialogflow/dialogflow-fulfillment-nodejs | |
// for Dialogflow fulfillment library docs, samples, and to report issues | |
'use strict'; | |
const functions = require('firebase-functions'); | |
const {WebhookClient} = require('dialogflow-fulfillment'); | |
const {Payload} = require('dialogflow-fulfillment'); | |
const admin = require("firebase-admin"); | |
admin.initializeApp({ |
This file contains 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
#include <BLEDevice.h> | |
#include <BLEServer.h> | |
#include <BLEUtils.h> | |
#include <BLE2902.h> | |
// Device Name: Maximum 30 bytes | |
#define DEVICE_NAME "LINE Things Trial ESP32" | |
// User service UUID: Change this to your generated service UUID | |
#define USER_SERVICE_UUID {serviceUUID}" |
This file contains 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
[ | |
{ | |
"label": "4", | |
"title": "Surprisingly delightful", | |
"text": "This is a fast read filled with unexpected humour and profound insights into the art of politics and policy. In brief, it is sly, wry, and wise.", | |
}, | |
{ | |
"label": "2", | |
"title": "Works, but not as advertised", | |
"text": "I bought one of these chargers..the instructions say the lights stay on while the battery charges...true. The instructions doNT say the lights turn off when its done. Which is also true. 24 hours of charging and the lights stay on. I returned it thinking I had a bad unit.The new one did the same thing. I just kept it since it does charge...but the lights are useless since they seem to always stay on. It's a \"backup\" charger for when I manage to drain all my AAs but I wouldn't want this as my only charger.", |