CN106649248A - Single-line text alignment method and translated file processing method of DWG file - Google Patents

Single-line text alignment method and translated file processing method of DWG file Download PDF

Info

Publication number
CN106649248A
CN106649248A CN201611179677.1A CN201611179677A CN106649248A CN 106649248 A CN106649248 A CN 106649248A CN 201611179677 A CN201611179677 A CN 201611179677A CN 106649248 A CN106649248 A CN 106649248A
Authority
CN
China
Prior art keywords
translation
width
original text
text
layer
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
CN201611179677.1A
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.)
Chengdu Excellent Translation Information Technology Ltd By Share Ltd
Original Assignee
Chengdu Excellent Translation Information Technology Ltd By Share Ltd
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 Chengdu Excellent Translation Information Technology Ltd By Share Ltd filed Critical Chengdu Excellent Translation Information Technology Ltd By Share Ltd
Priority to CN201611179677.1A priority Critical patent/CN106649248A/en
Publication of CN106649248A publication Critical patent/CN106649248A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/189Automatic justification

Landscapes

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

Abstract

The invention discloses a single-line text alignment method and a translated file processing method of a DWG file. The single-line text alignment method comprises the following steps: A, the number of bytes of the original text and the translated text are respectively obtained according to the variable length character section; and B, according to the width and the number of bytes of the original text, and the number of bytes of the translated text, the width of the translated text is adjusted. The translated text is scaled relative to the original text, so that the width of the translated text is appropriate to avoid the too large width of the translated text to block other lines or other words in AutoCAD, and the cleanliness of the translated text is also improved.

Description

The single file text alignment schemes and translated document processing method of DWG file
Technical field
The present invention relates to translation technology field, and in particular to a kind of single file text alignment schemes based on DWG formatted files.
Background technology
DWG formatted files are that a kind of drawing that AutoCAD is founded preserves form, have become the reference format of D CAD, A lot of other CAD also directly use DWG working documents by default for compatible AutoCAD.People make drawing when except Many mark property or illustrative text message are additionally provided with outside figure in drawing, in information exchange, often due to language Difference, need that the text message in DWG formatted files is carried out to derive again after translation process.Prior art is to DWG forms The translation processing mode of file is:DWG formatted files are converted into DXF formatted files, the coding using DXF formatted files is special Property, the text message in DXF formatted files is completed to extract automatically and store, automatically translation is backfilling into original after the completion of translation The position of text message.
Following problem occasionally there are using this kind of mode:Due to translation and the difference of original text languages, the translation phase after translation For original text, translation width is wider than original text width so that translation causes to block to lines or other words, is not easy to user Adjustment is checked.
The content of the invention
Single file text alignment schemes and translated document in order to solve a kind of DWG file of above-mentioned technical problem offer of the invention Processing method.
The present invention is achieved through the following technical solutions:
A kind of single file text alignment schemes based on DWG formatted files, comprise the following steps:
A, the byte number for obtaining original text and translation respectively according to variable length word tally used in ancient times as credentials or a warrant;
B, the width according to original text, original text byte number, translation byte number are adjusted to the width of translation.
For the translated document of AutoCAD, this programme provides a kind of single file text alignment schemes, by translation relative to original text Proportional zoom is carried out, makes the width of translation suitable, it is to avoid the width of translation is wide to other lines in AutoCAD or other words Block, can also improve the tidiness of translation.
Step B is specially:
B1, the scaling T for determining translation, wherein T=(original text width/original text byte number)/(original text width/translation word Joint number);
B2, determine translation width L, wherein, L=original texts width/T.
In translation process, the width of original text determines, by above-mentioned steps, according to original text width adjustment translation width, makes Keep aliging between translation and original text.
A kind of translated document processing method of DWG file, comprises the following steps:
Analyzing step:DWG formatted files are converted to after DXF formatted files, the text to be translated in DXF formatted files is extracted The positional information of notebook data and text data to be translated;
Translation steps:Text data to be translated is called in predetermined translating equipment, by human translation or machine translation Generate translation data corresponding with text data to be translated;
Translation alignment step, obtains byte number, the original text width of original text and translation, and the width according to original text, original text word Joint number, translation byte number are adjusted to the width of translation;
Translation data are write DXF forms by translation write step according to the positional information of corresponding text data to be translated Corresponding position in file so that DXF formatted files are the DXF formatted files with translation data;
Rear DWG formatted files deriving step is translated, the DXF formatted files with translation data are converted into translation data DWG formatted files and derive.
The translation alignment step is specially:
A, acquisition original text width, and the byte number of original text and translation is obtained respectively according to variable length word tally used in ancient times as credentials or a warrant;
B, the width according to original text, original text byte number, translation byte number are adjusted to the width of translation.
Step B is specially:
B1, the scaling T for determining translation, wherein T=(original text width/original text byte number)/(original text width/translation word Joint number);
B2, determine translation width L, wherein, L=original texts width/T.
In the translation that above-mentioned translated document processing method is obtained, user manually adjusts sometimes to translation, when DWG lattice When formula file has multiple figure layers, user needs to find translation place figure layer during adjusting manually and the part could be carried out , when the translation for needing adjustment is more, there is multiple figure layer switching in adjustment, the workload of user's adjustment is big.To understand Certainly above-mentioned technical problem, this programme is further improved on the basis of above-mentioned translated document processing method, i.e., also included Following steps:
Newly-built translation figure layer step, the newly-built translation figure layer on the DXF formatted files with translation data;
Translation data and translation figure layer are set up corresponding relation by translation figure layer relation establishment step;
Deriving step, is converted into the DXF formatted files with translation data and translation figure layer DWG formatted files and leads Go out.
A newly-built translation figure layer on the basis of DXF formatted files after existing translation, translation figure layer has with all of There is corresponding relation, when the later stage adjusts, the direct paginal translation texts and pictures layer of user is operated, and eliminates tune between the figure layer of translation The searching of figure layer and switch operating during whole, effectively alleviate the workload of user.
The translation figure layer relation establishment step is specially:The translation of each figure layer is mapped in translation figure layer, wherein wrapping Include the mapping of translation position and the mapping of translation data.User directly adjusts when adjusting in the later stage to the data of version It is whole, according to mapping relations, you can the translation data of each figure layer are adjusted.
The mapping of translation position is specially and makes translation identical in the coordinate of translation figure layer with translation in the coordinate of place figure layer.
The present invention compared with prior art, has the following advantages and advantages:
1st, translation is carried out proportional zoom by single file text alignment schemes of the invention relative to original text, and the width for making translation is closed It is suitable, it is to avoid the width of translation is wide to be blocked to other lines in AutoCAD or other words.
2nd, the present invention is specifically applied to single file text alignment schemes in translated document processing method, and at translated document A newly-built translation figure layer on the basis of reason method, translation figure layer and it is all of have between the figure layer of translation have corresponding relation, When later stage adjusts, the direct paginal translation texts and pictures layer of user is operated, and eliminates the searching of figure layer and switching work during adjustment Make, effectively alleviate the workload of user.
Specific embodiment
To make the object, technical solutions and advantages of the present invention become more apparent, with reference to embodiment, to present invention work Further to describe in detail, exemplary embodiment and its explanation of the invention is only used for explaining the present invention, is not intended as to this The restriction of invention.
Embodiment 1
A kind of single file text alignment schemes of DWG file, comprise the following steps:
A, acquisition original text width, and the byte number of original text and translation is obtained respectively according to variable length word tally used in ancient times as credentials or a warrant;
B, the width according to original text, original text byte number, translation byte number are adjusted to the width of translation.
Step B is specially:
B1, the scaling T for determining translation, wherein T=(original text width/original text byte number)/(original text width/translation word Joint number);
B2, determine translation width L, wherein, L=original texts width/T.
Embodiment 2
Based on above-described embodiment, now lift a specific embodiment and be explained.
Plaintext data is:Live width;Translation is:line width.
When the width to translation is adjusted, concrete grammar is as follows:
Wherein, the width of original text is:1.5, byte number is:6;
The byte number of translation is:10;
Then T=1.67
Translation width L=0.89
Embodiment 3
Above-mentioned single file text alignment schemes are specifically applied in cad file translation processing method, specially:
A kind of translated document processing method of DWG file, comprises the following steps:
Analyzing step:DWG formatted files are converted to after DXF formatted files, the text to be translated in DXF formatted files is extracted The positional information of notebook data and text data to be translated;
Translation steps:Text data to be translated is called in predetermined translating equipment, by human translation or machine translation Generate translation data corresponding with text data to be translated;
Translation alignment step, obtains byte number, the original text width of original text and translation, and the width according to original text, original text word Joint number, translation byte number are adjusted to the width of translation;
Translation data are write DXF forms by translation write step according to the positional information of corresponding text data to be translated Corresponding position in file so that DXF formatted files are the DXF formatted files with translation data;
Rear DWG formatted files deriving step is translated, the DXF formatted files with translation data are converted into translation data DWG formatted files and derive.
The translation alignment step is specially:
A, acquisition original text width, and the byte number of original text and translation is obtained respectively according to variable length word tally used in ancient times as credentials or a warrant;
B, the width according to original text, original text byte number, translation byte number are adjusted to the width of translation.
Step B is specially:
B1, the scaling T for determining translation, wherein T=(original text width/original text byte number)/(original text width/translation word Joint number);
B2, determine translation width L, wherein, L=original texts width/T.
Embodiment 4
It is further comprising the steps of:
Newly-built translation figure layer step, the newly-built translation figure layer on the DXF formatted files with translation data;
Translation data and translation figure layer are set up corresponding relation by translation figure layer relation establishment step;
Deriving step, is converted into the DXF formatted files with translation data and translation figure layer DWG formatted files and leads Go out.
In translation figure layer relation establishment step:The translation of each figure layer is mapped in translation figure layer, including translation The mapping of position and the mapping of translation data.Wherein, translation position includes translation place figure layer, the coordinate of translation place figure layer.
For the editor for reducing file compilation process and be easy to each figure layer translation, translation place figure layer coordinate with it is right Answer translation identical in the coordinate of translation figure layer.The coordinate phase of the translation coordinate position of i.e. each figure layer and corresponding translation in translation figure layer Together, the coordinate position of paginal translation texts and pictures layer adjusts the adjustment of the translation coordinate position i.e. to each figure layer, makes adjustment process more directly perceived.
In order to be best understood from this programme, illustrated with an example.
For example, figure layer 1 includes translation data 1:A, translation data 2:B, it is respectively in the coordinate position of the figure layer:(- 153.5092862294951,579.433621858247), (- 153.5092862294951,581.4336218582471);Figure Layer 2 includes translation data 3:C, its coordinate is to be in the coordinate position of the figure layer:(- 157.5092862294951, 581.4336218582471);Figure layer 3 includes translation data 4:D, its coordinate is to be in the coordinate position of the figure layer:(- 157.5092862294951,579.433621858247).
Translation figure layer relation establishment step is respectively written into translation data 1 i.e. in newly-built figure layer 0 in figure layer 0:A, translation number According to 2:B, translation data 3:C, translation data 4:D, its coordinate position in translation figure layer be respectively (- 153.5092862294951,579.433621858247), (- 153.5092862294951,581.4336218582471), (- 157.5092862294951,581.4336218582471), (- 157.5092862294951,579.433621858247).
Because the translation of translation figure layer is mapping relations with the translation of each figure layer, the translation of translation figure layer is directly adjusted The adjustment to each figure layer translation is completed, it is convenient and swift, it is to avoid the searching of figure layer and switch operating during adjustment, effectively mitigate The workload of user.
Above-described specific embodiment, has been carried out further to the purpose of the present invention, technical scheme and beneficial effect Describe in detail, should be understood that the specific embodiment that the foregoing is only the present invention, be not intended to limit the present invention Protection domain, all any modification, equivalent substitution and improvements within the spirit and principles in the present invention, done etc. all should include Within protection scope of the present invention.

Claims (8)

1. single file text alignment schemes of a kind of DWG file, it is characterised in that comprise the following steps:
A, acquisition original text width, and the byte number of original text and translation is obtained respectively according to variable length word tally used in ancient times as credentials or a warrant;
B, the width according to original text, original text byte number, translation byte number are adjusted to the width of translation.
2. single file text alignment schemes of a kind of DWG file according to claim 1, it is characterised in that:Step B is concrete For:
B1, the scaling T for determining translation, wherein T=(original text width/original text byte number)/(original text width/translation byte Number);
B2, determine translation width L, wherein, L=original texts width/T.
3. the translated document processing method of a kind of DWG file, it is characterised in that comprise the following steps:
Analyzing step:DWG formatted files are converted to after DXF formatted files, the textual data to be translated in DXF formatted files is extracted According to the positional information with text data to be translated;
Translation steps:Text data to be translated is called in predetermined translating equipment, is generated by human translation or machine translation Translation data corresponding with text data to be translated;
Translation alignment step, obtains byte number, the original text width of original text and translation, and the width according to original text, original text byte number, Translation byte number is adjusted to the width of translation;
Translation data are write DXF formatted files by translation write step according to the positional information of corresponding text data to be translated In corresponding position so that DXF formatted files are the DXF formatted files with translation data;
Rear DWG formatted files deriving step is translated, the DXF formatted files with translation data are converted into translation data DWG formatted files are simultaneously derived.
4. the translated document processing method of a kind of DWG file according to claim 3, it is characterised in that:The translation pair It is specially suddenly in step:
A, acquisition original text width, and the byte number of original text and translation is obtained respectively according to variable length word tally used in ancient times as credentials or a warrant;
B, the width according to original text, original text byte number, translation byte number are adjusted to the width of translation.
5. the translated document processing method of a kind of DWG file according to claim 4, it is characterised in that:Step B is concrete For:
B1, the scaling T for determining translation, wherein T=(original text width/original text byte number)/(original text width/translation byte Number);
B2, determine translation width L, wherein, L=original texts width/T.
6. the translated document processing method of a kind of DWG file according to claim 3, it is characterised in that also including following Step:
Newly-built translation figure layer step, the newly-built translation figure layer on the DXF formatted files with translation data;
Translation data and translation figure layer are set up corresponding relation by translation figure layer relation establishment step;
Deriving step, is converted into the DXF formatted files with translation data and translation figure layer DWG formatted files and derives.
7. the translated document processing method of a kind of DWG file according to claim 6, it is characterised in that:The translation figure Layer relation establishment step is specially:The translation of each figure layer is mapped in translation figure layer, including translation position mapping and The mapping of translation data.
8. the translated document processing method of a kind of DWG file according to claim 7, it is characterised in that:Translation position Mapping is specially makes translation identical in the coordinate of translation figure layer with translation in the coordinate of place figure layer.
CN201611179677.1A 2016-12-19 2016-12-19 Single-line text alignment method and translated file processing method of DWG file Pending CN106649248A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611179677.1A CN106649248A (en) 2016-12-19 2016-12-19 Single-line text alignment method and translated file processing method of DWG file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611179677.1A CN106649248A (en) 2016-12-19 2016-12-19 Single-line text alignment method and translated file processing method of DWG file

Publications (1)

Publication Number Publication Date
CN106649248A true CN106649248A (en) 2017-05-10

Family

ID=58833742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611179677.1A Pending CN106649248A (en) 2016-12-19 2016-12-19 Single-line text alignment method and translated file processing method of DWG file

Country Status (1)

Country Link
CN (1) CN106649248A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111191470A (en) * 2019-12-25 2020-05-22 语联网(武汉)信息技术有限公司 Document translation method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101714139A (en) * 2008-10-07 2010-05-26 英业达股份有限公司 System for storing real-time translation data according to cursor positions and method thereof
CN102436439A (en) * 2010-09-29 2012-05-02 鸿富锦精密工业(深圳)有限公司 Text box and text display method
CN103049167A (en) * 2011-11-02 2013-04-17 微软公司 Optimal display and zoom of objects and text in a document
CN105975461A (en) * 2016-05-27 2016-09-28 成都优译信息技术有限公司 Method for newly adding translation in DWG format file
CN106021242A (en) * 2016-05-27 2016-10-12 成都优译信息技术有限公司 Write-back system of drawing interpretation data in DWG format and write-back method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101714139A (en) * 2008-10-07 2010-05-26 英业达股份有限公司 System for storing real-time translation data according to cursor positions and method thereof
CN102436439A (en) * 2010-09-29 2012-05-02 鸿富锦精密工业(深圳)有限公司 Text box and text display method
CN103049167A (en) * 2011-11-02 2013-04-17 微软公司 Optimal display and zoom of objects and text in a document
CN105975461A (en) * 2016-05-27 2016-09-28 成都优译信息技术有限公司 Method for newly adding translation in DWG format file
CN106021242A (en) * 2016-05-27 2016-10-12 成都优译信息技术有限公司 Write-back system of drawing interpretation data in DWG format and write-back method thereof

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
刘冲亚: "《浅谈计算机辅助翻译TRADOS的优势》", 《科技视界》 *
李宇鹏等: "《机械制图》", 31 December 2015, 中国农业科学技术出版社 *
赵岩等: "《中文AutoCAD2014辅助设计案例精讲》", 28 February 2014, 北京希望电子出版社 *
黄洋: "《使用AutoCAD读取Ovation组态图参数》", 《东北电力技术》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111191470A (en) * 2019-12-25 2020-05-22 语联网(武汉)信息技术有限公司 Document translation method and device

Similar Documents

Publication Publication Date Title
Wockel Principal 2-bundles and their gauge 2-groups
US8635518B1 (en) Methods and systems to copy web content selections
CN104391826A (en) Data format conversion method and data format converter
CN102122280B (en) Method and system for intelligently extracting content object
WO2002077875A3 (en) Methods and apparatus for processing data in a content network
CN104679726A (en) Type setting method and device of word files
Xiu et al. Global projection-type error bounds for general variational inequalities
CN105824794A (en) Annotation adding method and device
CN106649248A (en) Single-line text alignment method and translated file processing method of DWG file
CN102467496B (en) Method and device for converting stream mode typeset content into block mode typeset document
CN102999488B (en) Transcription platform system and its implementation
CN104166574A (en) Interface display method and system
CN109343835A (en) A kind of rapid build business scaffold code instrumentation based on template
CN106021242A (en) Write-back system of drawing interpretation data in DWG format and write-back method thereof
CN104391831A (en) Method and system for commenting file contents
CN106777145A (en) A kind of interpretation method based on DWG formatted files
CN106650083A (en) DWG format file-based translation data processing method
CN104794300A (en) Automatic generation method for IEC 61850 logic node graphic symbols
CN103810312B (en) Method and device for the computer-aided design of man-machine interface animated graphics element
CN107609226A (en) A kind of method that building construction process inspection is carried out using VR virtual images
KR20020000413A (en) The converting method from the docutment written by QuarkXpress to the XML data
Jackson Material vernaculars: objects, images, and their social worlds
CN105373635B (en) The construction method of substation and regulation and control center graphic and model integration full information model
Zinsel Hands, Up
JP2015041309A (en) Method of displaying reference information during document display

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170510