Word document-based pseudo code automatic formatting method and system

A pseudo-code and document technology, applied in the field of document automatic editing, can solve the problems of reducing the efficiency of editing pseudo-code in Word software, cannot become an alternative, and cumbersome code editing, etc., achieves strong flexibility, avoids editing and processing, and improves The effect of work efficiency

Pending Publication Date: 2021-03-23
SHANDONG NORMAL UNIV
View PDF3 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The inventor found that, unlike the programming environment, in general word processing software, the code is in the same format as other text, so the code will not be automatically reviewed and formatted with code features, such as keyword highlighting, adding lines No. or other formatting, so in general word processing software, the editing of the code is more cumbersome
[0005] Secondly, although there are relevant algorithm packages available in some professional format editing software, such as LaTeX, the cost of learning and using as a general user is relatively high, and cannot be a viable alternative
[0006] Furthermore, as the most commonly used office word processing software, Word already has powerful editing functions, but in terms of pseudo-code editing, most of the current situations still need to use basic functions to edit and process word by word, and non-automatic processing reduces Word software. The productivity of editing pseudocode in

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Word document-based pseudo code automatic formatting method and system
  • Word document-based pseudo code automatic formatting method and system
  • Word document-based pseudo code automatic formatting method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0035] The present embodiment provides a method for automatically formatting pseudo-codes based on Word documents, which belongs to a method for automatically formatting pseudo-codes based on VBA codes in Word, such as figure 1 shown, including:

[0036] S1: Receive pseudocode and format request;

[0037] S2: Call the table in the Word document according to the pseudo code, and input the body and title of the pseudo code into the first cell and the second cell of the table;

[0038] S3: Match each word in the first cell with the keyword according to the keyword in the formatting request and the target format of the keyword, and format the successfully matched words according to the target format;

[0039] S4: add a tab stop for adding line numbers at the head of each line of the statement in the pseudo-code text in the first cell;

[0040] S5: In the second cell, format the title of the pseudo-code according to the title format in the formatting request.

[0041] In this em...

Embodiment 2

[0083] The present embodiment provides a kind of pseudo-code automatic formatting system based on Word document, comprising:

[0084] The receiving module is used to receive pseudocode and format requests;

[0085] Form module, is used for calling the form in the Word document according to pseudocode, and the body text and title of pseudocode are input in the first cell and the second cell of form;

[0086] The first formatting module is used to match each word in the first cell with the keyword according to the keyword in the formatting request and the target format of the keyword, and format the successfully matched words according to the target format;

[0087] The second formatting module is used to add a tab stop for adding line numbers at the head of each row of statements in the pseudo-code text in the first cell;

[0088] The third formatting module is used to format the title of the pseudo-code in the second cell according to the title format in the formatting reques...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a Word document-based pseudo code automatic formatting method and system. The method comprises the steps of receiving a pseudo code and a formatting request; calling a form inthe Word document according to the pseudo code, and inputting a text and a title of the pseudo code into a first cell and a second cell of the form; matching each word in the first cell with a keywordaccording to the keyword in the formatting request and a target format of the keyword, and formatting the successfully matched words according to the target format; adding a tabulation bit for addinga row number to the head of each row of statements of the pseudo code text in the first cell; and formatting the pseudo code title in the second cell according to the title format in the formatting request. Automatic formatting of pseudo code characters is realized based on VBA in Word software. According to the method, form line adding, process keyword thickening, row number adding, title setting and the like are carried out on pseudo codes macroscopically and automatically.

Description

technical field [0001] The invention relates to the technical field of document automatic editing, in particular to a method and system for automatically formatting pseudocodes based on Word documents. Background technique [0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art. [0003] Under the background of the rapid development and penetration of digital and computer technology in today's society, various media exchanges in various aspects related to information technology are developing day by day; while the rebroadcasting and communication of various technologies based on documents is still one of the most important means at present. one. Whether it is information technology, data technology or computer-related technology, the algorithm to solve a problem is always the core of technology. Program flow description based on pseudocode is a common, important and effective...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F40/103G06F40/166
CPCG06F40/103G06F40/166
Inventor 郑自然
Owner SHANDONG NORMAL UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products