ITÊýÂë ¹ºÎï ÍøÖ· Í·Ìõ Èí¼þ ÈÕÀú ÔĶÁ ͼÊé¹Ý
TxTС˵ÔĶÁÆ÷
¡ýÓïÒôÔĶÁ,С˵ÏÂÔØ,¹ÅµäÎÄѧ¡ý
ͼƬÅúÁ¿ÏÂÔØÆ÷
¡ýÅúÁ¿ÏÂÔØͼƬ,ÃÀŮͼ¿â¡ý
ͼƬ×Ô¶¯²¥·ÅÆ÷
¡ýͼƬ×Ô¶¯²¥·ÅÆ÷¡ý
Ò»¼üÇå³ýÀ¬»ø
¡ýÇáÇáÒ»µã,Çå³ýϵͳÀ¬»ø¡ý
¿ª·¢: C++֪ʶ¿â Java֪ʶ¿â JavaScript Python PHP֪ʶ¿â È˹¤ÖÇÄÜ Çø¿éÁ´ ´óÊý¾Ý Òƶ¯¿ª·¢ ǶÈëʽ ¿ª·¢¹¤¾ß Êý¾Ý½á¹¹ÓëËã·¨ ¿ª·¢²âÊÔ ÓÎÏ·¿ª·¢ ÍøÂçЭÒé ϵͳÔËά
½Ì³Ì: HTML½Ì³Ì CSS½Ì³Ì JavaScript½Ì³Ì GoÓïÑÔ½Ì³Ì JQuery½Ì³Ì VUE½Ì³Ì VUE3½Ì³Ì Bootstrap½Ì³Ì SQLÊý¾Ý¿â½Ì³Ì CÓïÑÔ½Ì³Ì C++½Ì³Ì Java½Ì³Ì Python½Ì³Ì Python3½Ì³Ì C#½Ì³Ì
ÊýÂë: µçÄÔ ±Ê¼Ç±¾ ÏÔ¿¨ ÏÔʾÆ÷ ¹Ì̬ӲÅÌ Ó²ÅÌ ¶ú»ú ÊÖ»ú iphone vivo oppo СÃ× »ªÎª µ¥·´ ×°»ú ͼÀ­¶¡
 
   -> È˹¤ÖÇÄÜ -> Ѷ·É´óÊý¾Ý¾ºÈü2022 Æû³µÁìÓò¶àÓïÖÖǨÒÆѧϰ ´ò¿¨²©¿Í -> ÕýÎÄÔĶÁ

[È˹¤ÖÇÄÜ]Ѷ·É´óÊý¾Ý¾ºÈü2022 Æû³µÁìÓò¶àÓïÖÖǨÒÆѧϰ ´ò¿¨²©¿Í

import  pandas as pd
import numpy as np
# ´ò¿ªÊý¾Ý (ÈÎÎñÒ»)
train_zh= pd.read_excel("data/ÖÐÎÄ_trian.xlsx")
train_zh.head()
ԭʼÎı¾Òâͼ²ÛÖµ1²ÛÖµ2
016.5¶Èadjust_ac_temperature_to_numberoffset:16.5NaN
116¶Èadjust_ac_temperature_to_numberoffset:16NaN
216¿Õµ÷¿ªµ½16¶Èadjust_ac_temperature_to_numberoffset:16NaN
316ζÈ16¶Èadjust_ac_temperature_to_numberoffset:16NaN
417¶Èadjust_ac_temperature_to_numberoffset:17NaN
train_en = pd.read_excel("data/Ó¢ÎÄ_train.xlsx")
train_en.head()
ԭʼÎı¾ÖÐÎÄ·­ÒëÒâͼ²ÛÖµ1²ÛÖµ2
0open aircon pleaseÇë´ò¿ª¿Õµ÷open_acNaNNaN
1I want to activate the ACÎÒÏë´ò¿ª¿Õµ÷open_acNaNNaN
2I want to turn on the air conditionerÎÒÏë´ò¿ª¿Õµ÷open_acNaNNaN
3switch on the AC pleaseÇë´ò¿ª¿Õµ÷open_acNaNNaN
4Help me open the AC°ïÎÒ´ò¿ª¿Õµ÷open_acNaNNaN
train_ja = pd.read_excel("data/ÈÕÓï_train.xlsx")
train_ja.head()
ԭʼÎı¾ÖÐÎÄ·­ÒëÒâͼ²ÛÖµ1²ÛÖµ2
0¥¨¥¢¥³¥ó¤Î¥¹¥¤¥Ã¥ÁON¤Ë´ò¿ª¿Õµ÷¿ª¹Øopen_acNaNNaN
1¥¨¥¢¥³¥óÈë¤ì¤ë´ò¿ª¿Õµ÷open_acNaNNaN
2¥¨¥¢¥³¥ó¤Î¥¹¥¤¥Ã¥Á¤ò´ò¿ª¿Õµ÷¿ª¹Øopen_acNaNNaN
3¥¨¥¢¥³¥ó¤Î¥¹¥¤¥Ã¥ÁÈë¤ì¤ë´ò¿ª¿Õµ÷¿ª¹Øopen_acNaNNaN
4¥¨¥¢¥³¥ó¤Î¥¹¥¤¥Ã¥ÁON´ò¿ª¿Õµ÷¿ª¹Øopen_acNaNNaN
test_ja = pd.read_excel("data/testA.xlsx",sheet_name="ÈÕÓï_testA")
test_en = pd.read_excel("data/testA.xlsx",sheet_name="Ó¢ÎÄ_testA")
test_ja.head()
ԭʼÎı¾
0¥¨¥¢¥³¥ó¤ò¤Ä¤±¤ë
1¥¨¥¢¥³¥ó¸¶¤±¤ë
2¥¨¥¢¥³¥ó¤ò¤Ä¤±¤Æ¤¯¤À¤µ¤¤
3¥¨¥¢¥³¥ó¤òON¤Ë
4¥¨¥¢¥³¥ó
test_en.head()
ԭʼÎı¾
0switch on the AC
1air conditioner open
2Turn on the AC please
3I wanna switch on aircon please
4Help me switch on aircon
# ·Ö´Ê(ÈÎÎñ¶þ)
import jieba
import jieba.posseg as pseg
import nagisa  # ÈÕÓï·Ö´Ê°ü
[dynet] random seed: 1234
[dynet] allocating memory: 32MB
[dynet] memory allocation done.
# ²âÊÔÈÕÓï·Ö´Ê
text = 'Python¤Çº†…g¤Ëʹ¤¨¤ë¥Ä©`¥ë¤Ç¤¹'
words = nagisa.tagging(text)
print(words.words)
['Python', '¤Ç', 'º†…g', '¤Ë', 'ʹ¤¨¤ë', '¥Ä©`¥ë', '¤Ç¤¹']
# ²âÊÔÖÐÎÄ·Ö´Ê
words = jieba.lcut("²é¿´ÑµÁ·¼¯ºÍ²âÊÔ¼¯×Ö¶ÎÀàÐÍ,²¢½«Êý¾Ý¶ÁÈ¡´úÂëдµ½²©¿Í;")
print(words)
['²é¿´', 'ѵÁ·', '¼¯', 'ºÍ', '²âÊÔ', '¼¯×Ö¶Î', 'ÀàÐÍ', ',', '²¢', '½«', 'Êý¾Ý', '¶ÁÈ¡', '´úÂë', 'д', 'µ½', '²©¿Í', ';']
words = pseg.lcut("²é¿´ÑµÁ·¼¯ºÍ²âÊÔ¼¯×Ö¶ÎÀàÐÍ,²¢½«Êý¾Ý¶ÁÈ¡´úÂëдµ½²©¿Í;")
print(words)
[pair('²é¿´', 'v'), pair('ѵÁ·', 'vn'), pair('¼¯', 'q'), pair('ºÍ', 'c'), pair('²âÊÔ', 'vn'), pair('¼¯×Ö¶Î', 'n'), pair('ÀàÐÍ', 'n'), pair(',', 'x'), pair('²¢', 'c'), pair('½«', 'd'), pair('Êý¾Ý', 'n'), pair('¶ÁÈ¡', 'v'), pair('´úÂë', 'n'), pair('д', 'v'), pair('µ½', 'v'), pair('²©¿Í', 'nr'), pair(';', 'x')]
# ʹÓÃtf_idf ³éÈ¡ÌØÕ÷ ʹÓÃÂß¼­»Ø¹é½øÐÐÒâͼ·ÖÀà
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LogisticRegression
from sklearn.tree import DecisionTreeClassifier
from sklearn.pipeline import make_pipeline
train_ja["words"] = train_ja["ԭʼÎı¾"].apply(lambda x: " ".join(nagisa.tagging(x).words))
train_en["words"] = train_en["ԭʼÎı¾"].apply(lambda x: x.lower())
test_ja['words'] = test_ja['ԭʼÎı¾'].apply(lambda x: ' '.join(nagisa.tagging(x).words))
test_en['words'] = test_en['ԭʼÎı¾'].apply(lambda x: x.lower())
# ¹¹½¨Ä£ÐÍ
pipline = make_pipeline(TfidfVectorizer(),LogisticRegression())
pipline.fit(train_ja["words"].to_list() + train_en["words"].to_list(),
           train_ja["Òâͼ"].to_list() + train_en["Òâͼ"].to_list())
test_ja["Òâͼ"] = pipline.predict(test_ja['words'])
test_en["Òâͼ"] = pipline.predict(test_en['words'])
test_en['²ÛÖµ1'] = np.nan
test_en['²ÛÖµ2'] = np.nan
test_ja['²ÛÖµ1'] = np.nan
test_ja['²ÛÖµ2'] = np.nan
writer = pd.ExcelWriter("submit_LR.xlsx")
test_en.drop(["words"],axis=1).to_excel(writer, sheet_name='Ó¢ÎÄ_testA', index=None)
test_ja.drop(["words"],axis=1).to_excel(writer,sheet_name="ÈÕÓï_testA",index=None)
writer.save()
writer.close()

Ìá½»½á¹û:
ÔÚÕâÀï²åÈëͼƬÃèÊö

  È˹¤ÖÇÄÜ ×îÐÂÎÄÕÂ
2022Îâ¶÷´ï»úÆ÷ѧϰ¿Î³Ì¡ª¡ªµÚ¶þ¿Î£¨Éñ¾­Íø
µÚÊ®ÎåÕ ¹æÔòѧϰ
FixMatch: Simplifying Semi-Supervised Le
Êý¾ÝÍÚ¾òJava¡ª¡ªKmeansËã·¨µÄʵÏÖ
´óÄÔƤ²ãµÄ·Ö¸î·½·¨
¡¾·­Òë¡¿GPT-3ÊÇÈçºÎ¹¤×÷µÄ
ÂÛÎıʼÇ:TEACHTEXT: CrossModal Generaliz
python´ÓÁãѧ£¨Áù£©
Ïê½âPython 3.x µ¼Èë(import)
¡¾´ð¶ÁÕßÎÊ27¡¿backtrader²»Ö§³Ö×îа汾µÄ
ÉÏһƪÎÄÕ      ÏÂһƪÎÄÕ      ²é¿´ËùÓÐÎÄÕÂ
¼Ó:2022-06-29 19:04:19  ¸ü:2022-06-29 19:07:17 
 
¿ª·¢: C++֪ʶ¿â Java֪ʶ¿â JavaScript Python PHP֪ʶ¿â È˹¤ÖÇÄÜ Çø¿éÁ´ ´óÊý¾Ý Òƶ¯¿ª·¢ ǶÈëʽ ¿ª·¢¹¤¾ß Êý¾Ý½á¹¹ÓëËã·¨ ¿ª·¢²âÊÔ ÓÎÏ·¿ª·¢ ÍøÂçЭÒé ϵͳÔËά
½Ì³Ì: HTML½Ì³Ì CSS½Ì³Ì JavaScript½Ì³Ì GoÓïÑÔ½Ì³Ì JQuery½Ì³Ì VUE½Ì³Ì VUE3½Ì³Ì Bootstrap½Ì³Ì SQLÊý¾Ý¿â½Ì³Ì CÓïÑÔ½Ì³Ì C++½Ì³Ì Java½Ì³Ì Python½Ì³Ì Python3½Ì³Ì C#½Ì³Ì
ÊýÂë: µçÄÔ ±Ê¼Ç±¾ ÏÔ¿¨ ÏÔʾÆ÷ ¹Ì̬ӲÅÌ Ó²ÅÌ ¶ú»ú ÊÖ»ú iphone vivo oppo СÃ× »ªÎª µ¥·´ ×°»ú ͼÀ­¶¡

360ͼÊé¹Ý ¹ºÎï Èý·á¿Æ¼¼ ÔĶÁÍø ÈÕÀú ÍòÄêÀú 2024Äê12ÈÕÀú -2024/12/29 9:20:42-

ͼƬ×Ô¶¯²¥·ÅÆ÷
¡ýͼƬ×Ô¶¯²¥·ÅÆ÷¡ý
TxTС˵ÔĶÁÆ÷
¡ýÓïÒôÔĶÁ,С˵ÏÂÔØ,¹ÅµäÎÄѧ¡ý
Ò»¼üÇå³ýÀ¬»ø
¡ýÇáÇáÒ»µã,Çå³ýϵͳÀ¬»ø¡ý
ͼƬÅúÁ¿ÏÂÔØÆ÷
¡ýÅúÁ¿ÏÂÔØͼƬ,ÃÀŮͼ¿â¡ý
  ÍøÕ¾ÁªÏµ: qq:121756557 email:121756557@qq.com  ITÊýÂë
Êý¾Ýͳ¼Æ