CN106527876A - Method and system for counting webpage word number - Google Patents
Method and system for counting webpage word number Download PDFInfo
- Publication number
- CN106527876A CN106527876A CN201610991149.XA CN201610991149A CN106527876A CN 106527876 A CN106527876 A CN 106527876A CN 201610991149 A CN201610991149 A CN 201610991149A CN 106527876 A CN106527876 A CN 106527876A
- Authority
- CN
- China
- Prior art keywords
- number information
- counting
- character
- browser
- webpage
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 18
- 230000001960 triggered effect Effects 0.000 claims abstract description 23
- 235000014510 cooky Nutrition 0.000 claims description 6
- 238000000605 extraction Methods 0.000 claims description 3
- 230000009286 beneficial effect Effects 0.000 abstract description 3
- 230000007547 defect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/0483—Interaction with page-structured environments, e.g. book metaphor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a method for counting the webpage word number of a browser. The method comprises the following steps of: receiving a user triggered word number counting instruction and a character content selected on a webpage; counting character number information of the character content; and displaying the character number information on the browser. Visibly, in the embodiment, rapid and effective word number counting can be realized in a webpage; the disadvantage that word number counting cannot be directly carried out in a browser tool and webpage browsing equipment can be solved; use of users is convenient; and thus, the user experience is improved. The invention further discloses a system for counting the webpage word number of the browser; and same, the above beneficial effect can be realized.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method and a system for counting word number of a webpage.
Background
With the rapid popularization of the internet, people rely more and more on web pages to view information and edit characters. When viewing text content in a web browsing device, it is often desirable to know how many words there are for the corresponding text content. Especially when we are abstracting or editing a word, we can help us to precisely control the word count of the content of the word being viewed or edited if the word count information of the selected word can be known in advance.
The existing browser tool and the web page browsing device do not provide a word counting function, if the number of the web page characters is to be counted, a user needs to use a third-party word counting tool to select the word contents of which the word number is to be counted, then copy and paste the word contents into the third-party word counting tool to perform counting operation, and finally obtain the word number information of the corresponding words, so that the working or learning efficiency is greatly reduced.
Disclosure of Invention
The invention aims to provide a method and a system for counting the word number of a webpage, so as to count the number of characters on the webpage.
In order to achieve the above purpose, the embodiment of the present invention provides the following technical solutions:
a method for counting words of a browser webpage comprises the following steps:
receiving a word counting instruction triggered by a user and character contents selected on a webpage;
counting the character number information of the character content;
and displaying the character number information on a browser.
The receiving of the word count instruction triggered by the user and the character content selected on the webpage includes:
receiving a word counting instruction triggered by a user;
extracting characters from character contents selected by a user on a webpage, and temporarily storing the characters to a preset storage address; the preset Storage address comprises any one of a browser stack memory, a webpage DOM tree, a Local Storage and Cookies.
Wherein, the information of counting the number of characters of the character content comprises:
counting total word number information, digital information and symbol number information in the preset storage address respectively; wherein the total word number information at least comprises at least one of Chinese word number information and foreign word number information;
determining total character number information using the total word number information, the number information, and the symbol number information.
Wherein displaying the character number information on a browser comprises:
and displaying the total character number information, the total word number information, the number information and the symbol number information at predetermined positions of a browser respectively.
Wherein displaying the character number information on a browser comprises:
displaying the character number information at a preset position of the webpage; or,
displaying the character number information in a page popup frame mode; or,
and displaying the character number information in a desktop notification mode.
A system for counting words of a browser web page, comprising:
the receiving module is used for receiving word counting instructions triggered by a user and character contents selected on a webpage;
the statistical module is used for counting the character number information of the character content;
and the display module is used for displaying the character number information on a browser.
Wherein the receiving module comprises:
the receiving unit is used for receiving a word counting instruction triggered by a user;
the extraction unit is used for extracting characters from character contents selected by a user on a webpage and temporarily storing the characters to a preset storage address; the preset Storage address comprises any one of a browser stack memory, a webpage DOM tree, a Local Storage and Cookies.
Wherein the statistics module comprises:
a counting unit for counting total word number information, and symbol number information in the predetermined storage address, respectively; wherein the total word number information at least comprises at least one of Chinese word number information and foreign word number information;
a determination unit for determining total character number information using the total word number information, the number information, and the symbol number information.
Wherein the display module displays the total number of characters information, the total number of words information, the number information, and the number of symbols information at predetermined positions of a browser, respectively.
Wherein, any one of the display units of the display module:
the first display unit is used for displaying the character number information at a preset position of the webpage;
the second display unit is used for displaying the character number information in a page pop frame mode;
and the third display unit is used for displaying the character number information in a desktop notification mode.
According to the scheme, the method for counting the word number of the browser webpage, provided by the embodiment of the invention, comprises the following steps: receiving a word counting instruction triggered by a user and character contents selected on a webpage; counting the character number information of the character content; displaying the character number information on a browser; therefore, in the embodiment, the fast and effective word counting can be realized in the webpage, the defect that the word counting cannot be directly carried out in a browser tool and webpage browsing equipment is overcome, the use by a user is facilitated, and the user experience is improved; the invention also discloses a system for counting the word number of the browser webpage, and the beneficial effects can be realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a method for counting word counts of a browser webpage according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a system for counting word counts of a browser webpage according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a method and a system for counting the word number of a webpage, which are used for counting the number of characters on the webpage.
Referring to fig. 1, a method for counting word counts of a browser webpage according to an embodiment of the present invention includes:
s101, receiving a word counting instruction triggered by a user and character contents selected on a webpage;
the receiving of the word count instruction triggered by the user and the character content selected on the webpage includes:
receiving a word counting instruction triggered by a user;
extracting characters from character contents selected by a user on a webpage, and temporarily storing the characters to a preset storage address; the preset Storage address comprises any one of a browser stack memory, a webpage DOM tree, a Local Storage and Cookies.
Specifically, the character content selected by the user may be the character content selected by the user by long-pressing the screen and sliding the finger through the mobile device, or the character content selected by the user by pressing the left mouse button and dragging the cursor in the PC-side device; or the text content can be automatically selected by the user by clicking a button in the webpage; or text content selected by the user through other electronic devices using equivalent or similar operations. Similarly, the word count instruction triggered by the user may be a word count instruction triggered by clicking a button of a page in the web browsing device, or may be a word count instruction triggered by clicking a browser menu in a browser tool; the word counting instruction can be triggered by clicking a right key menu item in the webpage browsing equipment; or a word count instruction triggered by an operation such as a shortcut key in the browser.
Specifically, in this embodiment, the order in which the user triggers the word count command and selects the character content is not limited, and after the user selects the character content, the system automatically extracts the characters of the character content in the background and stores the extracted characters in the predetermined storage address, so that the background performs word count on the selected character content.
S102, counting character number information of the character content;
wherein, the information of counting the number of characters of the character content comprises:
counting total word number information, digital information and symbol number information in the preset storage address respectively; wherein the total word number information at least comprises at least one of Chinese word number information and foreign word number information;
determining total character number information using the total word number information, the number information, and the symbol number information.
The total word count information counted in the present embodiment may be chinese word count information, or may be foreign word count information, such as korean word count information, english word count information, and russian word count information, and is not limited herein.
If the character content includes not only chinese but also english, the total number information includes not only chinese number information and english number information, but also alphanumeric information, for example, the total number information of "Web page" is 3, and Web is an english word, i.e., 1 word, so that the number information of chinese in "Web page" is 2, the number information of english is 1, the number information of alphabet is 3, the punctuation mark is 0, and the number is 0, and the finally determined total number information of characters is the information of chinese plus alphabet, which is 5 in total.
S103, displaying the character number information on a browser.
Wherein displaying the character number information on a browser comprises:
and displaying the total character number information, the total word number information, the number information and the symbol number information at predetermined positions of a browser respectively.
Based on the above technical solution, displaying the character number information on a browser includes: displaying the character number information at a preset position of the webpage; or displaying the character number information in a page popup frame mode; or displaying the character number information in a desktop notification mode.
Specifically, an HTML tag can be constructed, word count statistical information is formatted and filled into the HTML tag; displaying dialog boxes, pop-up boxes or notification windows in the browser tool and the web browsing device, displaying the formatted character number information, and displaying the character number information, wherein the displayed character number information can be any combination of total character number information, total word number information, numerical information, symbol number information, Chinese word number information in the total word number information, foreign word number information and existing letter number information.
The system for counting the word number of the browser webpage provided by the embodiment of the invention is introduced below, and the system for counting the word number of the browser webpage described below and the method for counting the word number of the browser webpage described above can be referred to each other.
Referring to fig. 2, a system for counting word counts of a browser webpage according to an embodiment of the present invention includes:
a receiving module 100, configured to receive a word count command triggered by a user and a character content selected on a web page;
a counting module 200, configured to count character number information of the character content;
a display module 300, configured to display the character number information on a browser.
Based on the above technical solution, the receiving module includes:
the receiving unit is used for receiving a word counting instruction triggered by a user;
the extraction unit is used for extracting characters from character contents selected by a user on a webpage and temporarily storing the characters to a preset storage address; the preset Storage address comprises any one of a browser stack memory, a webpage DOM tree, a Local Storage and Cookies.
Based on the above technical solution, the statistics module includes:
a counting unit for counting total word number information, and symbol number information in the predetermined storage address, respectively; wherein the total word number information at least comprises at least one of Chinese word number information and foreign word number information;
a determination unit for determining total character number information using the total word number information, the number information, and the symbol number information.
Based on the technical scheme, the display module displays the total character number information, the total word number information, the number information and the symbol number information at preset positions of a browser respectively.
Based on the above technical solution, the display module displays any one of the units:
the first display unit is used for displaying the character number information at a preset position of the webpage;
the second display unit is used for displaying the character number information in a page pop frame mode;
and the third display unit is used for displaying the character number information in a desktop notification mode.
The method for counting the word number of the browser webpage provided by the embodiment of the invention comprises the following steps: receiving a word counting instruction triggered by a user and character contents selected on a webpage; counting the character number information of the character content; displaying the character number information on a browser; therefore, in the embodiment, the fast and effective word counting can be realized in the webpage, the defect that the word counting cannot be directly carried out in a browser tool and webpage browsing equipment is overcome, the use by a user is facilitated, and the user experience is improved; the invention also discloses a system for counting the word number of the browser webpage, and the beneficial effects can be realized.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A method for counting words of a browser webpage is characterized by comprising the following steps:
receiving a word counting instruction triggered by a user and character contents selected on a webpage;
counting the character number information of the character content;
and displaying the character number information on a browser.
2. The method for counting words of a browser webpage according to claim 1, wherein the receiving of the word counting instruction triggered by the user and the character content selected on the webpage comprises:
receiving a word counting instruction triggered by a user;
extracting characters from character contents selected by a user on a webpage, and temporarily storing the characters to a preset storage address; the preset Storage address comprises any one of a browser stack memory, a webpage DOM tree, a Local Storage and Cookies.
3. The method for counting words of a browser webpage according to claim 2, wherein the counting information of the number of characters of the character content comprises:
counting total word number information, digital information and symbol number information in the preset storage address respectively; wherein the total word number information at least comprises at least one of Chinese word number information and foreign word number information;
determining total character number information using the total word number information, the number information, and the symbol number information.
4. The method for counting words of a browser webpage according to claim 3, wherein the displaying the character number information on the browser comprises:
and displaying the total character number information, the total word number information, the number information and the symbol number information at predetermined positions of a browser respectively.
5. The method for counting words of web pages of browser according to any one of claims 1-4, wherein displaying the information of number of characters on browser comprises:
displaying the character number information at a preset position of the webpage; or,
displaying the character number information in a page popup frame mode; or,
and displaying the character number information in a desktop notification mode.
6. A system for counting words in a web page of a browser, comprising:
the receiving module is used for receiving word counting instructions triggered by a user and character contents selected on a webpage;
the statistical module is used for counting the character number information of the character content;
and the display module is used for displaying the character number information on a browser.
7. The system for counting words of a browser webpage according to claim 6, wherein the receiving module comprises:
the receiving unit is used for receiving a word counting instruction triggered by a user;
the extraction unit is used for extracting characters from character contents selected by a user on a webpage and temporarily storing the characters to a preset storage address; the preset Storage address comprises any one of a browser stack memory, a webpage DOM tree, a Local Storage and Cookies.
8. The system for counting words of a browser webpage according to claim 7, wherein the counting module comprises:
a counting unit for counting total word number information, and symbol number information in the predetermined storage address, respectively; wherein the total word number information at least comprises at least one of Chinese word number information and foreign word number information;
a determination unit for determining total character number information using the total word number information, the number information, and the symbol number information.
9. The system for counting words of a browser webpage according to claim 8,
the display module displays the total number of characters information, the total number of words information, the number information and the number of symbols information at predetermined positions of a browser, respectively.
10. The system for counting words of a web page of a browser according to any one of claims 6 to 9, wherein the display module displays any one of the following units:
the first display unit is used for displaying the character number information at a preset position of the webpage;
the second display unit is used for displaying the character number information in a page pop frame mode;
and the third display unit is used for displaying the character number information in a desktop notification mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610991149.XA CN106527876A (en) | 2016-11-10 | 2016-11-10 | Method and system for counting webpage word number |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610991149.XA CN106527876A (en) | 2016-11-10 | 2016-11-10 | Method and system for counting webpage word number |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106527876A true CN106527876A (en) | 2017-03-22 |
Family
ID=58350746
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610991149.XA Pending CN106527876A (en) | 2016-11-10 | 2016-11-10 | Method and system for counting webpage word number |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106527876A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107844238A (en) * | 2017-11-29 | 2018-03-27 | 佛山市因诺威特科技有限公司 | A kind of method and system for counting browsing device net page information |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103078647A (en) * | 2013-01-15 | 2013-05-01 | 中国科学院计算技术研究所 | Hardware decoding implementation system and method of LZ77 compression algorithm |
WO2013085102A1 (en) * | 2011-12-09 | 2013-06-13 | (주)네오위즈게임즈 | Method and apparatus for managing characters in online game |
CN103176969A (en) * | 2011-12-20 | 2013-06-26 | 腾讯科技(深圳)有限公司 | Method and device for sharing microblogging information |
CN103646078A (en) * | 2013-12-11 | 2014-03-19 | 北京启明星辰信息安全技术有限公司 | Method and device for realizing internet propaganda monitoring target evaluations |
CN105608074A (en) * | 2016-01-15 | 2016-05-25 | 中译语通科技(北京)有限公司 | Word counting method and device |
CN105630802A (en) * | 2014-10-30 | 2016-06-01 | 阿里巴巴集团控股有限公司 | Webpage duplication removal method and apparatus |
-
2016
- 2016-11-10 CN CN201610991149.XA patent/CN106527876A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013085102A1 (en) * | 2011-12-09 | 2013-06-13 | (주)네오위즈게임즈 | Method and apparatus for managing characters in online game |
CN103176969A (en) * | 2011-12-20 | 2013-06-26 | 腾讯科技(深圳)有限公司 | Method and device for sharing microblogging information |
CN103078647A (en) * | 2013-01-15 | 2013-05-01 | 中国科学院计算技术研究所 | Hardware decoding implementation system and method of LZ77 compression algorithm |
CN103646078A (en) * | 2013-12-11 | 2014-03-19 | 北京启明星辰信息安全技术有限公司 | Method and device for realizing internet propaganda monitoring target evaluations |
CN105630802A (en) * | 2014-10-30 | 2016-06-01 | 阿里巴巴集团控股有限公司 | Webpage duplication removal method and apparatus |
CN105608074A (en) * | 2016-01-15 | 2016-05-25 | 中译语通科技(北京)有限公司 | Word counting method and device |
Non-Patent Citations (2)
Title |
---|
SCAVIN: "Word Count–统计选中网页的字数的 Chrome 扩展", 《小众软件》 * |
SFUFOET: "小众计数器", 《小众软件》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107844238A (en) * | 2017-11-29 | 2018-03-27 | 佛山市因诺威特科技有限公司 | A kind of method and system for counting browsing device net page information |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9152730B2 (en) | Extracting principal content from web pages | |
US9262051B2 (en) | Method and apparatus for displaying pop-up | |
US10838592B2 (en) | Terminal and method for determining type of input method editor | |
CN108255923B (en) | Image display method and device and electronic device | |
CN104331474A (en) | Page processing method and device | |
CN102831155A (en) | Method and device for displaying micro image of webpage tag | |
Garcia-Lopez et al. | Validation of navigation guidelines for improving usability in the mobile web | |
CN104077273A (en) | Method and device for extracting webpage contents | |
CN105528200B (en) | Display method and device of browser tab | |
CN108804469B (en) | Webpage identification method and electronic equipment | |
CN105488051B (en) | Webpage processing method and device | |
CN105260433A (en) | Webpage content collecting method and electronic device | |
CN106598409B (en) | Text copying method and device and intelligent terminal | |
US20190026072A1 (en) | Method for detecting usage of a screen reader and system thereof | |
CN104090869A (en) | Network information translating method and translating system | |
CN104281560A (en) | Memory text information display method and device and terminal | |
JP6667452B2 (en) | Method and apparatus for inputting text information | |
CN111199136A (en) | Document content display method, device and equipment | |
EP4155890A1 (en) | Method and device for responding to user operation | |
CN106527876A (en) | Method and system for counting webpage word number | |
CN110515618B (en) | Page information input optimization method, equipment, storage medium and device | |
US9582574B2 (en) | Generating navigable content overviews | |
CN114997126A (en) | Electronic form display method and device, electronic equipment and storage medium | |
CN104090935A (en) | Method for quickly displaying network information | |
CN112749528A (en) | Text processing method and device, electronic equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170322 |