cpp-course-example-cosine-similarity
所属分类:聚类算法
开发工具:C++
文件大小:5KB
下载次数:0
上传日期:2018-07-17 13:53:30
上 传 者:
sh-1993
说明: 圭兰大学编程基础课程的代码示例,2016年秋季。
(Code example for the Fundamentals of Programming course at the University of Guilan, Fall 2016.)
文件列表:
LICENSE (1081, 2018-07-17)
build.sh (45, 2018-07-17)
cossim.cpp (4891, 2018-07-17)
sample-input1.txt (623, 2018-07-17)
sample-input2.txt (748, 2018-07-17)
sample-output.txt (9, 2018-07-17)
sample-run.sh (113, 2018-07-17)
stopwords.txt (969, 2018-07-17)
# C++ Course Example: Cosine Similarity
This is a code example for the *Intro to Programming with C++* course at the University of Guilan, Fall 2016.
The purpose of this example is to familiarize students with:
- Functions,
- Pointers and references,
- Arrays,
- Strings,
- Streams, and
- Files.
In this example, we'll:
- Read two lines of text from two files, and
- Tokenize them;
- Read a list of [stop words](https://en.wikipedia.org/wiki/Stop_words) from another file, and
- Filter them out;
- Compute the [cosine similarity](https://en.wikipedia.org/wiki/Cosine_similarity) of the two lines of text (using frequencies), and
- Write the result into a file.
近期下载者:
相关文件:
收藏者: