我在用spacy具有类型进行操作后得到的元素很少 输入-
var config = {
// Firebase API Stuff
};
firebase.initializeApp(config);
var database = firebase.database();
$(document).on('ready', function() {
var database = new Firebase("https://myFireBaseDBSite.firebaseio.com/");
var Player1 = new Firebase('https://myFireBaseDBSite.firebaseio.com/player1');
var Player2 = new Firebase('https://myFireBaseDBSite.firebaseio.com/player2');
var PlayerChat = new Firebase('https://myFireBaseDBSite.firebaseio.com/chat');
输出:
li = ['India', 'Australia', 'Brazil'] for i in li: print(type(i))
<class 'spacy.tokens.token.Token'>
<class 'spacy.tokens.token.Token'>
我想使列表中的所有元素都具有str类型以便进行迭代。 预期输出-
<class 'spacy.tokens.token.Token'>
输出
li = ['India', 'Australia', 'Brazil'] for i in li: print(type(i))
<class 'str'>
<class 'str'>
请提出一些优化的方法。
答案 0 :(得分:1)