我正在创建一个聊天机器人.所以,我需要二进制格式的word2vec文件.当我加载bin文件时,我得到这种类型的错误.
import gensim
model = gensim.models.Word2Vec.load('GoogleNews-vectors-negative300.bin')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/surya/anaconda3/lib/python3.6/site-packages/gensim/models/word2vec.py", line 975, in load
return super(Word2Vec, cls).load(*args, **kwargs)
File "/home/surya/anaconda3/lib/python3.6/site-packages/gensim/models/base_any2vec.py", line 629, in load
model = super(BaseWordEmbeddingsModel, cls).load(*args, **kwargs)
File "/home/surya/anaconda3/lib/python3.6/site-packages/gensim/models/base_any2vec.py", line 278, in load
return super(BaseAny2VecModel, cls).load(fname_or_handle, **kwargs)
File "/home/surya/anaconda3/lib/python3.6/site-packages/gensim/utils.py", line 395, in load
obj = unpickle(fname)
File "/home/surya/anaconda3/lib/python3.6/site-packages/gensim/utils.py", line 1302, in unpickle
return _pickle.load(f, encoding='latin1')_pickle.
UnpicklingError: invalid load key, '3'.
Run Code Online (Sandbox Code Playgroud) 在 loginUser 函数中,我想访问 'stsTokenManager' 中的 accessToken 的值,但是当我尝试访问该值时,我得到了 'undefind' 值。
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
Image,
Button,
TouchableWithoutFeedback, StatusBar, TextInput,
SafeAreaView, Keyboard, TouchableOpacity,
KeyboardAvoidingView
} from 'react-native';
import { CheckBox, Item, Label, Input } from 'native-base';
import * as firebase from 'firebase';
const firebaseconfig={
apiKey: " ",
authDomain: " ",
databaseURL: " ",
projectId: " ",
storageBucket: " ",
messagingSenderId: ""
};
firebase.initializeApp(firebaseconfig);
export default class Login extends Component{
// static navigationOptions = { …Run Code Online (Sandbox Code Playgroud) javascript json firebase react-native firebase-authentication