阅读txt文件&保存每个单词的位置 [英] reading txt file & saving the place of each word

查看:93
本文介绍了阅读txt文件&保存每个单词的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何读取txt文件,并将每个单词(令牌)的位置保存在其中并保存它出现的语句?



i认为我应该改进我的问题:



我想存储我从txt文件中读取的每个单词的位置(我想存储每个单词的句子)我该怎么办?从文件中读取?

how can i read txt file, and save the place of each word (token) in it & save the statement that it appear in?

i think i should improve my question:

I want to store the place of each word that i read from a txt file (i want to store the sentence of each word ) how should i read from file?

推荐答案

文件I / O [ ^ ],字符串 [ ^ ]。把这些知识放在一起,你应该能够有一个良好的开端。
File I/O[^], Strings[^]. Just put that knowledge together and you should be able to make a good start.


这篇关于阅读txt文件&保存每个单词的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆