CN112883710A - Method for optimizing poems authored by user - Google Patents

Method for optimizing poems authored by user Download PDF

Info

Publication number
CN112883710A
CN112883710A CN202110032593.XA CN202110032593A CN112883710A CN 112883710 A CN112883710 A CN 112883710A CN 202110032593 A CN202110032593 A CN 202110032593A CN 112883710 A CN112883710 A CN 112883710A
Authority
CN
China
Prior art keywords
sentence
words
user
participles
poems
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
Application number
CN202110032593.XA
Other languages
Chinese (zh)
Inventor
戴宇航
王梓伊
刘逸聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202110032593.XA priority Critical patent/CN112883710A/en
Publication of CN112883710A publication Critical patent/CN112883710A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/247Thesauruses; Synonyms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Machine Translation (AREA)

Abstract

The invention relates to a method for optimizing poems authored by users, which comprises the following steps: receiving poems input by a user; performing sentence division on poems according to punctuation marks in the poems; segmenting each divided sentence; detecting whether two corresponding sentences of the input poems have corresponding participles which do not accord with level and narrow tones and rhyme rules; when the detection result is positive, searching a plurality of candidate words for the corresponding participles of a later sentence from a prestored corpus according to the level and the tone of the corresponding participles of a previous sentence in the two corresponding sentences, wherein the level and the tone of the plurality of candidate words are the same as the level and the tone of the corresponding participles of the previous sentence in the two corresponding sentences; presenting the retrieved plurality of candidate words to the user to enable the user to select a replacement word from the plurality of candidate words according to the contextual semantics and mood of the input poetry; and replacing the corresponding participles which do not accord with the flat and narrow rules and the rhyme rules by the replacing words so as to output the optimized poems.

Description

Method for optimizing poems authored by user
Technical Field
The invention relates to the technical field of computers, in particular to a method for optimizing poems created by users based on artificial intelligence.
Background
Artificial intelligence AI is a new technical science that studies and develops intelligence for simulating, extending and expanding people, which is a branch of computer science, and the studies in this field include robotics, speech recognition, natural language processing, and the like.
In the prior art, poetry is generated mainly by using a computer AI technology, but a technology for assisting and optimizing poetry created by a user, particularly a pupil is not available, in practice, the pupil can encounter a plurality of problems in the poetry creating process, such as that the created poetry is not rhyme, is not correct, is duplicated and rhyme, and the pupil cannot find or cannot find a proper word to replace the proper word based on own capability. Therefore, the existing technology for generating poetry by the computer AI has poor interactivity with the user, and may not obtain poetry in the semantic and context desired by the user.
Disclosure of Invention
The present invention aims to provide a method for optimizing poetry authored by a user, so as to solve the above problems.
According to an aspect of an embodiment of the present invention, there is provided a method for optimizing poetry authored by a user, including: receiving poems input by a user; performing sentence division on poems according to punctuation marks in the poems; segmenting each divided sentence; detecting whether two corresponding sentences of the input poems have corresponding participles which do not accord with level and narrow tones and rhyme rules; when the detection result is positive, searching a plurality of candidate words for the corresponding participles of a later sentence from a prestored corpus according to the level and the tone of the corresponding participles of a previous sentence in the two corresponding sentences, wherein the level and the tone of the plurality of candidate words are the same as the level and the tone of the corresponding participles of the previous sentence in the two corresponding sentences; presenting the retrieved plurality of candidate words to the user to enable the user to select a replacement word from the plurality of candidate words according to the contextual semantics and mood of the input poetry; and replacing the corresponding participles which do not accord with the flat and narrow rules and the rhyme rules by using the replaced words so as to output the optimized poems.
Preferably, the retrieved plurality of candidate words is presented to the user while words are recommended to the user according to the priorities of the plurality of candidate words.
Preferably, the priority is based on words that are synonymous or near-synonymous with the corresponding participle of the previous sentence.
Preferably, the priority is based on words that are struggled against corresponding participles of sentences that are adjacent to the following sentence.
Preferably, the priority is based on a probability of occurring with a corresponding participle of a sentence adjacent to the following sentence.
Preferably, words having the same source of corresponding participles of sentences adjacent to the following sentence are given the highest priority.
Preferably, the corpus further comprises a personalized corpus for each user, the method further comprising: multiple personal corpora are created for multiple different users and individual users are allowed to add personalized words to the personal corpora to customize the personalized corpora.
Preferably, retrieving the plurality of candidate words from the pre-stored corpus for the corresponding participles of the subsequent sentence further comprises retrieving the plurality of candidate words from the personalized corpus.
Drawings
The invention is described below by way of example with reference to the following reference signs according to an advantageous embodiment. Shown here are:
FIG. 1 is a flow chart of a method for optimizing poetry authored by a user in accordance with the present invention.
Detailed Description
The application environment of the method for optimizing poetry created by a user can be in an ancient poetry generating scene in the field of artificial intelligence, and comprises a server and a client, wherein the client can be but is not limited to a mobile phone, a personal computer, a tablet computer, an intelligent device and the like.
Fig. 1 is a flowchart of a method for optimizing a poetry authored by a user according to the present invention, which is illustrated by way of example in a personal computer, and is described in detail below.
The method comprises the following steps:
step S100, receiving poetry input by a user, wherein the user can input the poetry by operating an input device, for example, the user can input the created poetry into a computer by a keyboard, a touch screen, a voice recognition device, and the like.
Step S101, a chinese word segmentation tool such as IKAnanlyzer is used to perform sentence division on the poetry sentence of the input poetry according to punctuation marks, for example, the input poetry is: yulan bract is included to attack thin rain, and peaches are angry to release spring breeze. I wish to compete for beauty in a great amount and compete for fragrance in Wuhan. ", the divided sentences are: the magnolia bud-containing rain-catching part is used for catching drizzle; "peaceful flowers release the wind of spring. "; "I wish to compete for beauty in a hundred flowers"; contesting for sending fragrance into Wuhan. ".
Step S102: the divided sentences are participled by using a Chinese word segmentation tool such as IKANLyzer, for example, the sentence "peaceful flower is full of spring wind. "divided into" peach blossom/angry/bath/spring minutes/. "the sentence" contests the fragrance into wuhan. "divided into" contest/fragrance/income/martial Han/. ".
Step S103: whether corresponding participles which do not accord with the flat tone and rhyme rules exist in two corresponding sentences of the input poetry is detected, and according to the rhyme rule of the ancient poetry, the two corresponding sentences can be adjacent poetry sentences with sentence numbers, for example, for the poetry example, the two corresponding sentences can be' peaceful and angry spring breeze. 'and' sending fragrance into Wuhan. Accordingly, it is detected that the corresponding participles are "spring wind" and "wuhan", and the "wind" and "han" in the two words are not rhyme-imputed, so that a rhyme-imputing-free prompt can be given, and intelligent retrieval and recommendation can be performed, as follows.
Step S104: when the detection result is yes, searching a plurality of candidate words with the same level and tone and the same vowel for the corresponding participle of the later sentence from a pre-stored corpus according to the level and tone and the vowel of the corresponding participle of the previous sentence in the two corresponding sentences; the pre-stored corpus can use a Chinese word segmentation tool such as an IKANLyzer to segment all poems in the existing poetry set, and store the segmentation result in the corpus, preferably, store the segmentation result in the corpus according to the sentence-matching form.
Specifically, the vowel "eng" for "wind" can retrieve candidate words such as "wasteland city", "east city", "dragon city", "wei city", "jiangcheng" from the pre-stored corpus.
Alternatively, the corpus is not limited to a corpus storing existing poetry, but may also include a personalized corpus for each user, e.g., multiple personal corpuses may be created for multiple different users and individual users are allowed to add personalized words to the personal corpus to customize the personalized corpus. For example, students who school in "hong ying school" can construct words such as "hong ying", "green grass", "safflower", "podium" and the like as a personal corpus as needed. Accordingly, a plurality of candidate words may also be retrieved from the personalized corpus.
Step S105: presenting the retrieved plurality of candidate words to the user to enable the user to select a replacement word from the plurality of candidate words according to the contextual semantics and mood of the input poetry.
Additionally, words are recommended to the user according to the priorities of the plurality of candidate words while the retrieved plurality of candidate words are presented to the user.
As an example, since "river city" has the same meaning as "wuhan", the river city has a high priority, and thus "river city" is recommended to the user as "wuhan" to the replacement word, thereby expressing the same context as the context to be expressed by the user.
As another example, a recommendation is made to the user based on words that are struggled against corresponding participles of a subsequent sentence, such as: the input poem is 'closing the new crown for months' while forbidding the deviation to imperial park. One dike of old willow facing fine rain, both banks with peach blossom. ", detecting the corresponding word segmentation of" line "," open "without rhyme; giving out no-rhyme cue, and in all the retrieved words with the same level and narrow and lasting, because 'thin rain' and 'spring breeze' are in good balance, the words are preferentially recommended, and according to intelligent recommendation, the words are finally optimized as follows: in months of closing the new crown, the restriction of the new crown is biased to defend the garden. One dike of old willow facing fine rain and two banks of peach blossom laughing east wind. ".
As another example, words are recommended based on the probability of occurring with corresponding participles of sentences adjacent to a following sentence, e.g., words that are from the same source as the corresponding participles of sentences adjacent to the following sentence are recommended. Such as: "Shiwen condensed to the greenery area, scholarly gathers the red English. Chang graceful praise, and the longitudinal poem. "when detecting the corresponding segmentation of the corresponding sentence," poly-red-English "," English "and" song "in the poetry song" do not enter rhyme; giving out a non-rhyme cue, wherein in all searched words with the same level, tone and final pitch as those of 'poly red English', because 'endowing Bixing' and 'elegance song' are from 'poetry Jing', and have the same source, the words are preferentially recommended and finally optimized into the following words according to intelligent recommendation: "Shiwen condensed to the greenery area, scholarly gathers the red English. The game poems are graceful and praise, and the longitudinal words are liked. ".
Step S106: and replacing the corresponding participles which do not accord with the flat and narrow rules and the rhyme rules by using the selected replacing words so as to output the optimized poetry.
The foregoing is merely a preferred embodiment of the present application and the present application is not limited thereto.

Claims (8)

1. A method for optimizing poetry authored by a user, comprising:
receiving poems input by a user;
sentence division is carried out on the poetry according to punctuation marks in the poetry;
segmenting each divided sentence;
detecting whether corresponding participles which do not accord with the level and zeptop rules exist in two corresponding sentences of the poetry;
when the detection result is positive, searching a plurality of candidate words for the corresponding participles of a later sentence from a prestored corpus according to the level and the tone of the corresponding participles of a previous sentence in the two corresponding sentences, wherein the level and the tone of the plurality of candidate words are the same as the level and the tone of the corresponding participles of the previous sentence in the two corresponding sentences;
presenting the retrieved plurality of candidate words to a user to enable the user to select a replacement word from the plurality of candidate words according to the context semantics and mood of the poetry input; and
and replacing the corresponding participles which do not accord with the flat and narrow rules and the rhyme rules by using the replaced words so as to output the optimized poems.
2. The method of claim 1, further comprising: recommending words to the user according to the priorities of the plurality of candidate words while presenting the retrieved plurality of candidate words to the user.
3. The method of claim 2, wherein the priority is based on words that are synonymous or near-synonymous with corresponding participles of the previous sentence.
4. The method of claim 2, wherein the priority is based on words of a corresponding participle pair-bar of a sentence adjacent to the following sentence.
5. The method of claim 1, wherein the priority is based on a probability of corresponding participles of sentences adjacent to the following sentence occurring together.
6. The method of claim 5, wherein words from the same source as corresponding participles of sentences adjacent to the following sentence are given highest priority.
7. The method of claim 1, wherein the corpus further comprises a personalized corpus for each user, the method further comprising: a plurality of personal corpora are created for a plurality of different users and individual users are allowed to add personalized words to the personal corpora to customize the personalized corpora.
8. The method of claim 7, wherein retrieving a plurality of candidate words from a pre-stored corpus for corresponding participles of a subsequent sentence further comprises retrieving the plurality of candidate words from the personalized corpus.
CN202110032593.XA 2021-01-13 2021-01-13 Method for optimizing poems authored by user Pending CN112883710A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110032593.XA CN112883710A (en) 2021-01-13 2021-01-13 Method for optimizing poems authored by user

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110032593.XA CN112883710A (en) 2021-01-13 2021-01-13 Method for optimizing poems authored by user

Publications (1)

Publication Number Publication Date
CN112883710A true CN112883710A (en) 2021-06-01

Family

ID=76044197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110032593.XA Pending CN112883710A (en) 2021-01-13 2021-01-13 Method for optimizing poems authored by user

Country Status (1)

Country Link
CN (1) CN112883710A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116011430A (en) * 2023-03-22 2023-04-25 暗链科技(深圳)有限公司 Vowel duplication elimination method, nonvolatile readable storage medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003150591A (en) * 2001-11-09 2003-05-23 Takashi Sato Chinese poetry making support system, support system for making last guidance word to be addressed to deceased persons soul in buohist funeral, and program
KR20050099471A (en) * 2005-08-29 2005-10-13 안희진 Chinese information processing method and its authentication system.
CN102385596A (en) * 2010-09-03 2012-03-21 腾讯科技(深圳)有限公司 Verse searching method and device
CN106569995A (en) * 2016-09-26 2017-04-19 天津大学 Method for automatically generating Chinese poetry based on corpus and metrical rule
CN109086270A (en) * 2018-07-24 2018-12-25 重庆大学 System and method of composing poem automatically based on classic poetry corpus vectorization
CN110705284A (en) * 2019-09-19 2020-01-17 苏州思必驰信息科技有限公司 Poetry generation quality optimization method and system based on neural network generation model

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003150591A (en) * 2001-11-09 2003-05-23 Takashi Sato Chinese poetry making support system, support system for making last guidance word to be addressed to deceased persons soul in buohist funeral, and program
KR20050099471A (en) * 2005-08-29 2005-10-13 안희진 Chinese information processing method and its authentication system.
CN102385596A (en) * 2010-09-03 2012-03-21 腾讯科技(深圳)有限公司 Verse searching method and device
CN106569995A (en) * 2016-09-26 2017-04-19 天津大学 Method for automatically generating Chinese poetry based on corpus and metrical rule
CN109086270A (en) * 2018-07-24 2018-12-25 重庆大学 System and method of composing poem automatically based on classic poetry corpus vectorization
CN110705284A (en) * 2019-09-19 2020-01-17 苏州思必驰信息科技有限公司 Poetry generation quality optimization method and system based on neural network generation model

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116011430A (en) * 2023-03-22 2023-04-25 暗链科技(深圳)有限公司 Vowel duplication elimination method, nonvolatile readable storage medium and electronic equipment
CN116011430B (en) * 2023-03-22 2024-04-02 暗链科技(深圳)有限公司 Vowel duplication elimination method, nonvolatile readable storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
Kondrak Algorithms for language reconstruction
Heine et al. The Kx'a family: A new Khoisan genealogy
CN111159368B (en) Reply generation method of personalized dialogue
CN104484411B (en) A kind of construction method of the semantic knowledge-base based on dictionary
US6963871B1 (en) System and method for adaptive multi-cultural searching and matching of personal names
CN110097085A (en) Lyrics document creation method, training method, device, server and storage medium
JP2009036999A (en) Interactive method using computer, interactive system, computer program and computer-readable storage medium
US20060089928A1 (en) Computer-implemented methods and systems for entering and searching for non-Roman-alphabet characters and related search systems
JP2005157524A (en) Question response system, and method for processing question response
WO2008107305A2 (en) Search-based word segmentation method and device for language without word boundary tag
KR20130128717A (en) Conversation managemnt system and method thereof
CN113779972B (en) Speech recognition error correction method, system, device and storage medium
KR102043353B1 (en) Apparatus and method for recognizing Korean named entity using deep-learning
CN110188174B (en) Professional field FAQ intelligent question and answer method based on professional vocabulary mining
CN113239666A (en) Text similarity calculation method and system
CN112489634A (en) Language acoustic model training method and device, electronic equipment and computer medium
WO2003085550A1 (en) Conversation control system and conversation control method
CN116092472A (en) Speech synthesis method and synthesis system
CN112883710A (en) Method for optimizing poems authored by user
Dall et al. Redefining the Linguistic Context Feature Set for HMM and DNN TTS Through Position and Parsing.
Lee et al. Machine comprehension of spoken content: TOEFL listening test and spoken SQuAD
KR100597435B1 (en) System and method for classfying question based on hybrid of information search and question answer system
JP6821542B2 (en) Dialogue control devices, programs and methods that can carry out multiple types of dialogue in succession.
Popescu-Belis et al. GPoeT: a language model trained for rhyme generation on synthetic data
Kopřivová et al. Multi-tier transcription of informal spoken Czech: The ORTOFON corpus approach

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination