找回密码
 中文实名注册
查看: 182|回复: 1

p4. ⽂本分类 (15 pts)

[复制链接]

697

主题

1085

帖子

2万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
22893
发表于 2022-6-19 18:36:41 | 显示全部楼层 |阅读模式

“分类” 是⼈⼯智能中很重要的⼀项任务,例如区分视频中的⼀帧图像是否存在异常事件、辨别图⽚中是否有待检索的⽬标、划分⾳频中词语的分界位置等。


虽然属于 “⼈⼯智能” 的范畴,但分类问题也可简单理解成是⼀个计算机函数 f,它输⼊⼀系列数据(例如代表图⽚颜⾊的⼆维数组、代表⽂本的字符串等),f(x)返回 0 或 1,其中 1 则代表x 具有某种特征,属于这⼀分类。


今天,⼤家要挑战⼀项⽂本的分类任务:识别⼀个单词序列是由英⽂书写的,还是由汉语拼⾳书写的。以下分别是两段⽂字,是⽤汉语拼⾳和英⽂书写的,你能正确地分类吗?


1. While a number of definitions of artificial intelligence (AI) have surfaced over the last few decades, John McCarthy offers the following definition in this 2004 paper, " It is the science and engineering of making intelligent machines,especially intelligent computer programs. It is related to the similar task of using computers to understand human intelligence, but AI does not have to confine itself to methods that are biologically observable."


2. Ren gong zhi neng shi yan jiu、kai fa yong yu mo ni、yan shen he kuo zhan ren de zhi neng de li lun、fang fa ji ying yong xi tong de yi men xin de ji shu ke xue.


输⼊格式
输⼊数据的第⼀⾏是你需要分类⽂本的任务数量 。接下来 ⾏,每⾏描述了⼀个⽂本分类任务,⾸先是整数 表⽰单词的个数,接下来 个空格分隔的、仅由⼩写字母 a-z 组成的字符串代表了⼀段待分类的⽂本。输⼊保证每个单词(对中⽂来说是每个字)之间都有⼀个空格。




输出格式
为每个分类任务输出⼀⾏,如果待分类的⽂本是拼⾳书写的,输出 “Pinyin”,如是英⽂书写的,输出 “English”(输出不包含引号,注意 “Pinyin” 和 “English” 的⼤⼩写)。


[size=12.8138pt]样例输⼊ 1

2
14 zhe ge ti mu qi shi bi ni xiang xiang de yao jian dan
6 this problem has a simple solution



样例输出 1

Pinyin
English



回复

使用道具 举报

1

主题

57

帖子

252

积分

中级会员

Rank: 3Rank: 3

积分
252
发表于 2022-6-19 19:03:35 | 显示全部楼层
此帖仅作者可见

使用道具 举报

您需要登录后才可以回帖 登录 | 中文实名注册

本版积分规则

小黑屋|东台市机器人学会 ( 苏ICP备2021035350号-1;苏ICP备2021035350号-2;苏ICP备2021035350号-3 )

GMT+8, 2024-5-22 09:53 , Processed in 0.050560 second(s), 27 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表