java实现文件单词频率统计 topN top K

Mou

Overview

Mou, the missing Markdown editor for web developers.

Syntax

Strong and Emphasize

strong or strong ( Cmd + B )

emphasize or emphasize ( Cmd + I )

Sometimes I want a lot of text to be bold. Like, seriously, a LOT of text

Blockquotes

Right angle brackets > are used for block quotes.

Links and Email

An email [email protected] link.

Simple inline link http://chenluois.com, another inline link Smaller, one more inline link with title Resize.

A reference style link. Input id, then anywhere in the doc, define the link with corresponding id:

Titles ( or called tool tips ) in the links are optional.

Images

An inline image , title is optional.

A reference style image.

Inline code and Block code

Inline code are surround by backtick key. To create a block code:

Indent each line by at least 1 tab, or 4 spaces.
var Mou = exactlyTheAppIwant;

Ordered Lists

Ordered lists are created using "1." + Space:

  1. Ordered list item
  2. Ordered list item
  3. Ordered list item

Unordered Lists

Unordered list are created using "*" + Space:

  • Unordered list item
  • Unordered list item
  • Unordered list item

Or using "-" + Space:

  • Unordered list item
  • Unordered list item
  • Unordered list item

Hard Linebreak

End a line with two or more spaces will create a hard linebreak, called <br /> in HTML. ( Control + Return )
Above line ended with 2 spaces.

Horizontal Rules

Three or more asterisks or dashes:




Headers

Setext-style:

This is H1

This is H2

atx-style:

This is H1

This is H2

This is H3

This is H4

This is H5
This is H6

Extra Syntax

Footnotes

Footnotes work mostly like reference-style links. A footnote is made of two things: a marker in the text that will become a superscript number; a footnote definition that will be placed in a list of footnotes at the end of the document. A footnote looks like this:

That‘s some text with a footnote.1

Strikethrough

Wrap with 2 tilde characters:

Strikethrough

Fenced Code Blocks

Start with a line containing 3 or more backticks, and ends with the first line with the same number of backticks:

Fenced code blocks are like Stardard Markdown’s regular code
blocks, except that they’re not indented and instead rely on
a start and end fence lines to delimit the code block.

Tables

A simple table looks like this:

First Header Second Header Third Header
Content Cell Content Cell Content Cell
Content Cell Content Cell Content Cell

If you wish, you can add a leading and tailing pipe to each line of the table:

First Header Second Header Third Header
Content Cell Content Cell Content Cell
Content Cell Content Cell Content Cell

Specify alignment for each column by adding colons to separator lines:

First Header Second Header Third Header
Left Center Right
Left Center Right

Shortcuts

View

  • Toggle live preview: Shift + Cmd + I
  • Toggle Words Counter: Shift + Cmd + W
  • Toggle Transparent: Shift + Cmd + T
  • Toggle Floating: Shift + Cmd + F
  • Left/Right = 1/1: Cmd + 0
  • Left/Right = 3/1: Cmd + +
  • Left/Right = 1/3: Cmd + -
  • Toggle Writing orientation: Cmd + L
  • Toggle fullscreen: Control + Cmd + F

Actions

  • Copy HTML: Option + Cmd + C
  • Strong: Select text, Cmd + B
  • Emphasize: Select text, Cmd + I
  • Inline Code: Select text, Cmd + K
  • Strikethrough: Select text, Cmd + U
  • Link: Select text, Control + Shift + L
  • Image: Select text, Control + Shift + I
  • Select Word: Control + Option + W
  • Select Line: Shift + Cmd + L
  • Select All: Cmd + A
  • Deselect All: Cmd + D
  • Convert to Uppercase: Select text, Control + U
  • Convert to Lowercase: Select text, Control + Shift + U
  • Convert to Titlecase: Select text, Control + Option + U
  • Convert to List: Select lines, Control + L
  • Convert to Blockquote: Select lines, Control + Q
  • Convert to H1: Cmd + 1
  • Convert to H2: Cmd + 2
  • Convert to H3: Cmd + 3
  • Convert to H4: Cmd + 4
  • Convert to H5: Cmd + 5
  • Convert to H6: Cmd + 6
  • Convert Spaces to Tabs: Control + [
  • Convert Tabs to Spaces: Control + ]
  • Insert Current Date: Control + Shift + 1
  • Insert Current Time: Control + Shift + 2
  • Insert entity <: Control + Shift + ,
  • Insert entity >: Control + Shift + .
  • Insert entity &: Control + Shift + 7
  • Insert entity Space: Control + Shift + Space
  • Insert Scriptogr.am Header: Control + Shift + G
  • Shift Line Left: Select lines, Cmd + [
  • Shift Line Right: Select lines, Cmd + ]
  • New Line: Cmd + Return
  • Comment: Cmd + /
  • Hard Linebreak: Control + Return

Edit

  • Auto complete current word: Esc
  • Find: Cmd + F
  • Close find bar: Esc

Post

  • Post on Scriptogr.am: Control + Shift + S
  • Post on Tumblr: Control + Shift + T

Export

  • Export HTML: Option + Cmd + E
  • Export PDF: Option + Cmd + P

And more?

Don‘t forget to check Preferences, lots of useful options are there.

Follow @Mou on Twitter for the latest news.

For feedback, use the menu Help - Send Feedback


  1. And that’s the footnote.↩
时间: 2024-09-29 16:32:30

java实现文件单词频率统计 topN top K的相关文章

对英文文档中的单词与词组进行频率统计

一.程序分析 1.以只读模式读取文件到字符串 def process_file(path): try: with open(path, 'r') as file: text = file.read() except IOError: print("Read File Error!") return None return text 2.对字符串进行数据清洗,返回一个字典 import re word_list = re.sub('[^a-zA-Z0-9n]', ' ', textStr

统计单词频率

今天老师又安排了一个任务:统计一个文件中出现最多的几个单词出现的频率. 怎么说呢,还是一点不会,只能上网搜,通过两小时的奋斗,我还是没能做出来,但是我知道了如何从读取文件中的信息的代码以及如何统计单词频率的代码:然而,我无法把他们合起来,也无法理解许多代码的作用,就只知道其功能,所以我想,我还是该再去借一本书随身背着,然后就是多花时间学习java了. 今晚又经过三个多小时,又搜了搜想了想,还把一些相似的代码进行对照,然而我还是无法改动代码分毫,我觉得我很无能,感觉三个多小时是白搭了,一事无成,也

统计单词频率--map

问题描述: 输入一个单词列表,每行一个单词,统计单词出现的频率 思路: 主要是使用c++中的map容器.map实质上是一个二叉查找树,可以做到插入.删除.查询,平均查询时间在O(logn).n为map中元素的个数,将字符串数据插入到map后,再用迭代器去访问map中的元素时,其实是按照map中插入的字符串的字典序进行访问的. map可以建立任意两种数据类型的关系,形式为map<type1,type2>map1.type1表示键key,type2表示值value.键是用来进行索引. 源代码: 1

统计一段文章的单词频率,取出频率最高的5个单词和个数(python)

练习题:统计一段英语文章的单词频率,取出频率最高的5个单词和个数(用python实现) 怎么判定单词?1 不是字母的特殊字符作为分隔符分割字符串 (避免特殊字符的处理不便,全部替换成'-')2 遍历字符串,取每个word3 正则匹配 怎么统计个数?将wordlist的word和word的个数放入dict,排序 ''' dinghanhua 2018-11-11 练习:一段英文文章,统计每个单词的频率,返回出现频率最高的5个单词和次数 ''' import re art = ' If we wan

键盘录入一个文件夹路径,统计该文件夹(包含子文件夹)中每种类型的文件及个数,注意:用文件类型(后缀名,不包含.(点),如:&quot;java&quot;,&quot;txt&quot;)作为key, 用个数作为value,放入到map集合中,遍历map集合

package cn.it.zuoye5; import java.io.File;import java.util.HashMap;import java.util.Iterator;import java.util.Map;import java.util.Scanner;import java.util.Set; /** 键盘录入一个文件夹路径,统计该文件夹(包含子文件夹)中每种类型的文件及个数,注意:用文件类型(后缀名,不包含.(点),如:"java","txt&qu

单词词频统计(12组)

单词词频统计 0.前言 该程序写于2018年7月9日,在北京航空航天大学与南通大学鞠小林老师结对完成.在此期间通过结对编程完成整个项目的需求分析.设计.开发.测试等.现在回顾一下这个程序的编写过程.与鞠老师的合作是很愉快的.总体信息如下: + 小组GitHub 地址:https://github.com/yuan574954352/WordCount + 博客园博客地址: + PSP PSP2.1 Personal Software Process Stages 预估耗时(分钟) 实际耗时(分钟

java实训一——词频统计

---恢复内容开始--- 驾驶员:葛晨延(16012010) 领航员:张广哲(16012007) 码云:https://gitee.com/happywindmannn/GCYshixun1/tree/master 实训过程照片: 1 import java.io.*; 2 import java.util.*; 3 import java.io.BufferedReader; 4 import java.io.FileReader; 5 import java.util.ArrayList;

java打开文件夹(含判断操作系统工具类和解压缩工具类)

1.Runtime.getRuntime().exec("explorer D:\\Java"); 2.java.awt.Desktop.getDesktop().open(new File("D:\\Java")); 4.java.awt.Desktop.getDesktop().browse(...) 3. try { String[] cmd = new String[5]; cmd[0] = "cmd"; cmd[1] = "/

排序算法Java版,以及各自的复杂度,以及由堆排序产生的top K问题

常用的排序算法包括: 冒泡排序:每次在无序队列里将相邻两个数依次进行比较,将小数调换到前面, 逐次比较,直至将最大的数移到最后.最将剩下的N-1个数继续比较,将次大数移至倒数第二.依此规律,直至比较结束.时间复杂度:O(n^2) 选择排序:每次在无序队列中"选择"出最大值,放到有序队列的最后,并从无序队列中去除该值(具体实现略有区别).时间复杂度:O(n^2) 直接插入排序:始终定义第一个元素为有序的,将元素逐个插入到有序排列之中,其特点是要不断的 移动数据,空出一个适当的位置,把待插