CN104063483A - Method for complementing contexts of key word in self-adaptive mode - Google Patents
Method for complementing contexts of key word in self-adaptive mode Download PDFInfo
- Publication number
- CN104063483A CN104063483A CN201410314095.4A CN201410314095A CN104063483A CN 104063483 A CN104063483 A CN 104063483A CN 201410314095 A CN201410314095 A CN 201410314095A CN 104063483 A CN104063483 A CN 104063483A
- Authority
- CN
- China
- Prior art keywords
- current context
- character
- keyword
- read
- arranges
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
- G06F16/3332—Query translation
- G06F16/3335—Syntactic pre-processing, e.g. stopword elimination, stemming
Abstract
The invention discloses a method for complementing contexts of a key word in a self-adaptive mode. When a user sends the key word in an electronic file to the microblog and the like to share the key word, corresponding contexts can be automatically added for the key word according to the length range set by the user, and the semantic scene of the key word can be shown during sharing.
Description
Technical field
The present invention relates to field of information display, especially a kind of self-adaptation is supplied the contextual method of keyword.
Background technology
When user reads on computer and mobile device, can to some keyword, add mark to facilitate reference in another time read at electronic document.When user wishes by social networks, the keyword of oneself to be shared, because the keyword of mark is not enough to describe user's reading scene, by participator, possibly cannot be understood the implication of keyword.
Summary of the invention
Technical matters to be solved by this invention is the defect for background technology, provides a kind of self-adaptation to supply the contextual method of keyword, in the process of propagating, to user, represents the semantic scene with keyword.
The present invention is for solving the problems of the technologies described above by the following technical solutions:
Self-adaptation is supplied the contextual method of keyword, and when user shares the keyword in electronic document, the minimum length and the maximum length that automatically according to user, arrange are that keyword adds corresponding context, and step is as follows:
Step 1), sets up expansion punctuate table and general word and phrase database;
Step 2), getting keyword place paragraph in document is current context, judges that whether current context is greater than the maximum length that user arranges, and if so, gets keyword as current context;
Step 3), judges that whether current context is less than the minimum length that user arranges, and if so, expands current context;
Step 4), judges that whether current context is greater than the maximum length that user arranges, and if so, cuts down current context;
Step 5), shares the context of generation.
As a kind of self-adaptation of the present invention, supply the further prioritization scheme of the contextual method of keyword, the detailed step of described step 3) is as follows:
Step 3.1), the position according to keyword in paragraph arranges the dimension of current context, and keyword, when the first half of current context, arranges dimension backward, when the latter half of current context, dimension is set forward;
Step 3.2), dimension is backward time, and the first character after current context starts to read successively backward, and judge whether institute's reading character is the punctuation mark in expansion punctuate table, and if so, current context is expanded to herein, if not, continue to read, until document finishes;
Step 3.3), dimension is forward time, and the first character before current context starts to read forward successively, and judge whether institute's reading character is the punctuation mark in expansion punctuate table, and if so, current context is expanded to herein, if not, continue to read, until document starts;
Step 3.4), after each expansion, all need dimension to be next time set to contrary direction, and judge whether current context length is less than the minimum length that user arranges, if, continue expansion, until contextual length is greater than the minimum length value that user sets, or entire chapter document is all in context.
As a kind of self-adaptation of the present invention, supply the further prioritization scheme of the contextual method of keyword, the detailed step of described step 4) is as follows:
Step 4.1), the position according to keyword in current context arranges reduction direction, when the first half of keyword at current context, arranges and cuts down direction forward, when the latter half of keyword at current context, arranges and cuts down direction backward;
Step 4.2), cut down direction forward time, from last character of current context, start to read forward successively, often read a character, judge this character and whether word that the character that read in forms belongs to general word and phrase database, if belonged to, this character and the character that read in are rejected from current context, if do not belonged to, continue to read character late, until become the word in dictionary general word and phrase database or surpass 10 words deleted;
Step 4.3) cut down direction backward time, from the first character of current context, start to read backward successively, often read a character, whether the word that the character that judges this character and read in before forms belongs to general word and phrase database, if belonged to, this character and the character that read in are before rejected from current context, if do not belonged to, continue to read character late, until become the word in dictionary general word and phrase database or surpass 10 words deleted;
Step 4.4), after each reduction, all need to cut down direction next time and be set to contrary direction, and judge whether current context length is still greater than the maximum length that user sets, if so, continue to cut down, until contextual length is less than the maximum length that user sets.
As a kind of self-adaptation of the present invention, supply the further prioritization scheme of the contextual method of keyword, described expansion punctuate table comprises following punctuation mark: English fullstop ". ", Chinese fullstop ".", branch "; ", English comma, ", Chinese comma, ", pause mark ", ", question mark "? ", exclamation mark "! ", backslash " ".
As a kind of self-adaptation of the present invention, supply the further prioritization scheme of the contextual method of keyword, described general word and phrase database adopts the Chinese vocabulary bank of the search engine of increasing income.
The present invention adopts above technical scheme compared with prior art, has following technique effect:
1. provide a kind of self-adaptation to supply the contextual method of keyword, can represent to user the semantic scene of keyword.
2. the keyword that the length range that can arrange according to user is user adds corresponding context.
Embodiment
Below technical scheme of the present invention is described in further detail:
The invention discloses a kind of self-adaptation and supply the contextual method of keyword, when user shares the keyword in electronic document, the minimum length and the maximum length that automatically according to user, arrange are that keyword adds corresponding context, and step is as follows:
Step 1), sets up expansion punctuate table and general word and phrase database;
Step 2), getting keyword place paragraph in document is current context, judges that whether current context is greater than the maximum length that user arranges, and if so, gets keyword as current context;
Step 3), judges that whether current context is less than the minimum length that user arranges, and if so, expands current context;
Step 4), judges that whether current context is greater than the maximum length that user arranges, and if so, cuts down current context;
Step 5), shares the context of generation.
The detailed step of described step 3) is as follows:
Step 3.1), the position according to keyword in paragraph arranges the dimension of current context, and keyword, when the first half of current context, arranges dimension backward, when the latter half of current context, dimension is set forward;
Step 3.2), dimension is backward time, and the first character after current context starts to read successively backward, and judge whether institute's reading character is the punctuation mark in expansion punctuate table, and if so, current context is expanded to herein, if not, continue to read, until document finishes;
Step 3.3), dimension is forward time, and the first character before current context starts to read forward successively, and judge whether institute's reading character is the punctuation mark in expansion punctuate table, and if so, current context is expanded to herein, if not, continue to read, until document starts;
Step 3.4), after each expansion, all need dimension to be next time set to contrary direction, and judge whether current context length is less than the minimum length that user arranges, if, continue expansion, until contextual length is greater than the minimum length value that user sets, or entire chapter document is all in context.
The detailed step of described step 4) is as follows:
Step 4.1), the position according to keyword in current context arranges reduction direction, when the first half of keyword at current context, arranges and cuts down direction forward, when the latter half of keyword at current context, arranges and cuts down direction backward;
Step 4.2), cut down direction forward time, from last character of current context, start to read forward successively, often read a character, judge this character and whether word that the character that read in forms belongs to general word and phrase database, if belonged to, this character and the character that read in are rejected from current context, if do not belonged to, continue to read character late, until become the word in dictionary general word and phrase database or surpass 10 words deleted;
Step 4.3) cut down direction backward time, from the first character of current context, start to read backward successively, often read a character, whether the word that the character that judges this character and read in before forms belongs to general word and phrase database, if belonged to, this character and the character that read in are before rejected from current context, if do not belonged to, continue to read character late, until become the word in dictionary general word and phrase database or surpass 10 words deleted;
Step 4.4), after each reduction, all need to cut down direction next time and be set to contrary direction, and judge whether current context length is still greater than the maximum length that user sets, if so, continue to cut down, until contextual length is less than the maximum length that user sets.
Described expansion punctuate table comprises following punctuation mark: English fullstop ". ", Chinese fullstop ".", branch "; ", English comma, ", Chinese comma, ", pause mark ", ", question mark "? ", exclamation mark "! ", backslash " ".
Described general word and phrase database adopts the Chinese vocabulary bank of the search engine of increasing income.
Claims (6)
1. self-adaptation is supplied the contextual method of keyword, it is characterized in that: when user shares the keyword in electronic document, the minimum length and the maximum length that automatically according to user, arrange are that keyword adds corresponding context, and step is as follows:
Step 1), sets up expansion punctuate table and general word and phrase database;
Step 2), getting keyword place paragraph in document is current context, judges that whether current context is greater than the maximum length that user arranges, and if so, gets keyword as current context;
Step 3), judges that whether current context is less than the minimum length that user arranges, and if so, expands current context;
Step 4), judges that whether current context is greater than the maximum length that user arranges, and if so, cuts down current context;
Step 5), shares the context of generation.
2. a kind of self-adaptation according to claim 1 is supplied the contextual method of keyword, it is characterized in that the detailed step of described step 3) is as follows:
Step 3.1), the position according to keyword in paragraph arranges the dimension of current context, and keyword, when the first half of current context, arranges dimension backward, when the latter half of current context, dimension is set forward;
Step 3.2), dimension is backward time, and the first character after current context starts to read successively backward, and judge whether institute's reading character is the punctuation mark in expansion punctuate table, and if so, current context is expanded to herein, if not, continue to read, until document finishes;
Step 3.3), dimension is forward time, and the first character before current context starts to read forward successively, and judge whether institute's reading character is the punctuation mark in expansion punctuate table, and if so, current context is expanded to herein, if not, continue to read, until document starts;
Step 3.4), after each expansion, all need dimension to be next time set to contrary direction, and judge whether current context length is less than the minimum length that user arranges, if, continue expansion, until contextual length is greater than the minimum length value that user sets, or entire chapter document is all in context.
3. a kind of self-adaptation according to claim 2 is supplied the contextual method of keyword, it is characterized in that the detailed step of described step 4) is as follows:
Step 4.1), the position according to keyword in current context arranges reduction direction, when the first half of keyword at current context, arranges and cuts down direction forward, when the latter half of keyword at current context, arranges and cuts down direction backward;
Step 4.2), cut down direction forward time, from last character of current context, start to read forward successively, often read a character, judge this character and whether word that the character that read in forms belongs to general word and phrase database, if belonged to, this character and the character that read in are rejected from current context, if do not belonged to, continue to read character late, until become the word in dictionary general word and phrase database or surpass 10 words deleted;
Step 4.3) cut down direction backward time, from the first character of current context, start to read backward successively, often read a character, whether the word that the character that judges this character and read in before forms belongs to general word and phrase database, if belonged to, this character and the character that read in are before rejected from current context, if do not belonged to, continue to read character late, until become the word in dictionary general word and phrase database or surpass 10 words deleted;
Step 4.4), after each reduction, all need to cut down direction next time and be set to contrary direction, and judge whether current context length is still greater than the maximum length that user sets, if so, continue to cut down, until contextual length is less than the maximum length that user sets.
4. a kind of self-adaptation according to claim 1 is supplied the contextual method of keyword, it is characterized in that described expansion punctuate table comprises following punctuation mark: English fullstop ". ", Chinese fullstop ".
5. ", branch "; ", English comma, ", Chinese comma, ", pause mark ", ", question mark "? ", exclamation mark "! ", backslash " ".
6. a kind of self-adaptation according to claim 1 is supplied the contextual method of keyword, it is characterized in that described general word and phrase database adopts the Chinese vocabulary bank of the search engine of increasing income.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410314095.4A CN104063483A (en) | 2014-07-03 | 2014-07-03 | Method for complementing contexts of key word in self-adaptive mode |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410314095.4A CN104063483A (en) | 2014-07-03 | 2014-07-03 | Method for complementing contexts of key word in self-adaptive mode |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104063483A true CN104063483A (en) | 2014-09-24 |
Family
ID=51551197
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410314095.4A Pending CN104063483A (en) | 2014-07-03 | 2014-07-03 | Method for complementing contexts of key word in self-adaptive mode |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104063483A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107679225A (en) * | 2017-10-20 | 2018-02-09 | 哈尔滨工业大学 | A kind of reply generation method based on keyword |
CN108241612A (en) * | 2016-12-27 | 2018-07-03 | 北京国双科技有限公司 | Punctuation mark treating method and apparatus |
CN108572942A (en) * | 2018-04-20 | 2018-09-25 | 北京深度智耀科技有限公司 | A kind of method and apparatus creating hyperlink |
-
2014
- 2014-07-03 CN CN201410314095.4A patent/CN104063483A/en active Pending
Non-Patent Citations (1)
Title |
---|
徐晴阳: ""从网页中精确提取链接上下文相关文本"", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108241612A (en) * | 2016-12-27 | 2018-07-03 | 北京国双科技有限公司 | Punctuation mark treating method and apparatus |
CN107679225A (en) * | 2017-10-20 | 2018-02-09 | 哈尔滨工业大学 | A kind of reply generation method based on keyword |
CN107679225B (en) * | 2017-10-20 | 2021-03-09 | 哈尔滨工业大学 | Reply generation method based on keywords |
CN108572942A (en) * | 2018-04-20 | 2018-09-25 | 北京深度智耀科技有限公司 | A kind of method and apparatus creating hyperlink |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11562736B2 (en) | Speech recognition method, electronic device, and computer storage medium | |
US10860797B2 (en) | Generating summaries and insights from meeting recordings | |
WO2016037519A1 (en) | Input method and apparatus and electronic device | |
US20150006501A1 (en) | Discovering entity actions for an entity graph | |
CN104866478B (en) | Malicious text detection and identification method and device | |
US10296644B2 (en) | Salient terms and entities for caption generation and presentation | |
US9449002B2 (en) | System and method to retrieve relevant multimedia content for a trending topic | |
JP2017508214A (en) | Provide search recommendations | |
Renouf | A finer definition of neology in English | |
WO2019037258A1 (en) | Information recommendation method, device and system, and computer-readable storage medium | |
WO2014031458A1 (en) | Translating natural language utterances to keyword search queries | |
US10942953B2 (en) | Generating summaries and insights from meeting recordings | |
US9317583B2 (en) | Dynamic captions from social streams | |
WO2018121759A1 (en) | Intelligent question and answer method and system | |
KR20220054587A (en) | Speech Recognition Methods and Related Products | |
TW201606750A (en) | Speech recognition using a foreign word grammar | |
EP3115907A1 (en) | Common data repository for improving transactional efficiencies of user interactions with a computing device | |
US20160188569A1 (en) | Generating a Table of Contents for Unformatted Text | |
CN103678651A (en) | Sensitive word searching method and device | |
CN104063483A (en) | Method for complementing contexts of key word in self-adaptive mode | |
CN101271449B (en) | Method and device for reducing vocabulary and Chinese character string phonetic notation | |
JP2008009552A (en) | Index generation device, index generation method and index generation program | |
KR102102287B1 (en) | Method for crowdsourcing data of chat model for chatbot | |
US20200387815A1 (en) | Building training data and similarity relations for semantic space | |
CN105320641B (en) | Text verification method and user terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140924 |
|
RJ01 | Rejection of invention patent application after publication |