WO2026010140A1 - Electronic device, method, and non-transitory computer-readable storage medium for adjusting arrangement of contents of electronic document - Google Patents
Electronic device, method, and non-transitory computer-readable storage medium for adjusting arrangement of contents of electronic documentInfo
- Publication number
- WO2026010140A1 WO2026010140A1 PCT/KR2025/006745 KR2025006745W WO2026010140A1 WO 2026010140 A1 WO2026010140 A1 WO 2026010140A1 KR 2025006745 W KR2025006745 W KR 2025006745W WO 2026010140 A1 WO2026010140 A1 WO 2026010140A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- text
- area
- electronic device
- size
- electronic document
- 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 OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
- G06F40/106—Display of layout of documents; Previewing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
- G06F40/109—Font handling; Temporal or kinetic typography
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
- G06F40/117—Tagging; Marking up; Designating a block; Setting of attributes
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/40—Processing or translation of natural language
- G06F40/58—Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
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)
- User Interface Of Digital Computer (AREA)
Abstract
Description
본 개시(disclosure)는, 전자 문서(예, PDF(portable document format)에 기반하는 전자 문서 및/또는 상기 전자 문서를 포함하는 파일)의 콘텐트의 배열을 조절하기 위한 전자 장치, 방법, 및 비-일시적 컴퓨터 판독가능 저장 매체에 관한 것이다. The present disclosure relates to an electronic device, a method, and a non-transitory computer-readable storage medium for controlling the arrangement of content in an electronic document (e.g., an electronic document based on portable document format (PDF) and/or a file including the electronic document).
전자 문서는, 전자적 형태(예, 파일, 및/또는 네트워크를 통해 송신되는 비트스트림)를 가지는 문서로 설명된다. 예를 들어, PDF(portable document format)와 관련된 표준(예, ISO(international standard organization) 32000)에 기반하는 파일 내에, 텍스트, 도형, 이미지, 글꼴, 또는 이들의 조합에 기반하는 전자 문서가 저장될 수 있다. 전자 문서를 위한 소프트웨어 어플리케이션(예, 전자 문서 뷰어)을 실행한 전자 장치는, 파일로부터 전자 문서의 부분들을 각각 점유하는, 텍스트, 도형, 및/또는 이미지를 식별할 수 있다. 전자 장치는, 디스플레이 상에, 전자 문서에 의해 나타나는 레이아웃을 가지는 상기 텍스트, 상기 도형, 및/또는 상기 이미지를 표시할 수 있다. An electronic document is described as a document in electronic form (e.g., a file and/or a bitstream transmitted over a network). For example, an electronic document based on text, graphics, images, fonts, or a combination thereof may be stored within a file based on a standard related to the portable document format (PDF) (e.g., the International Standard Organization (ISO) 32000). An electronic device running a software application for electronic documents (e.g., an electronic document viewer) can identify text, graphics, and/or images, each occupying a portion of the electronic document, from the file. The electronic device can display the text, graphics, and/or images on a display having a layout represented by the electronic document.
상술한 정보는 본 개시에 대한 이해를 돕기 위한 것을 목적으로 하는 배경 기술(related art)로서 제공될 수 있다. 상술한 내용 중 어느 것도 본 개시와 관련된 종래 기술(prior art)로서 주장이 되거나, 종래 기술과 관련된 결정에 사용될 수 없다. The above information may be provided as background information to aid in understanding the present disclosure. None of the above is claimed to be prior art related to the present disclosure or can be used in making decisions related to prior art.
일 실시예(an embodiment)에 따른, 전자 장치(electronic device)는, 디스플레이, 하나 이상의 저장 매체들을 포함하고, 인스트럭션들을 저장하는 메모리, 및 처리 회로를 포함하는, 적어도 하나의 프로세서를 포함할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 전자 문서 내의 제1 영역 내에 포함된, 제1 언어의 제1 텍스트의 번역을 위한 입력을 수신하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 입력에 기반하여, 상기 제1 텍스트로부터 번역된 제2 언어의 제2 텍스트를 획득하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 전자 문서 내에서, 상기 제2 텍스트를 표시하기 위한 영역의 사이즈를 식별하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 전자 문서 내의 제1 영역의 사이즈 보다 큰 상기 영역의 상기 사이즈에 기반하여, 상기 전자 문서 내의 상기 제1 영역, 및 상기 전자 문서의 수직 방향을 따라 상기 제1 영역에 인접한, 상기 전자 문서 내의 제1 공백 영역을 포함하는, 상기 전자 문서 내의 제2 영역의 사이즈를 식별하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 제1 영역 및 상기 제1 공백 영역을 포함하는 상기 제2 영역에서 상기 제2 텍스트를 포함하는 상기 전자 문서를 표시하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 제2 영역의 상기 사이즈 보다 큰 상기 영역의 상기 사이즈에 기반하여, 상기 제1 영역, 및 상기 전자 문서의 수평 방향을 따라 상기 제1 영역에 인접한, 상기 전자 문서 내의 제2 공백 영역을 포함하는, 상기 전자 문서 내의 제3 영역에서, 상기 제2 텍스트를 포함하는 상기 전자 문서를 표시하도록, 야기할 수 있다. According to one embodiment, an electronic device may include a display, a memory including one or more storage media and storing instructions, and at least one processor including a processing circuit. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to receive an input for translating a first text in a first language contained in a first area within an electronic document. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to obtain a second text in a second language translated from the first text based on the input. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify a size of an area within the electronic document for displaying the second text. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify a size of a first area within the electronic document, the first area being greater than a size of the first area within the electronic document, and a size of a second area within the electronic document, the second area including a first blank area within the electronic document, adjacent to the first area along a vertical direction of the electronic document. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to display the electronic document including the second text in the second area, the second area including the first area and the first blank area. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to display the electronic document including the second text in a third area within the electronic document, the third area including the first area and a second blank area within the electronic document, adjacent to the first area along a horizontal direction of the electronic document, based on the size of the area being greater than the size of the second area.
일 실시예에서 인스트럭션들을 저장하는, 비-일시적 컴퓨터 판독가능 저장 매체가 제공될 수 있다. 상기 인스트럭션들은, 디스플레이를 포함하는 전자 장치에 의해 실행될 시, 상기 전자 장치가, 전자 문서 내의 제1 영역 내에 포함된, 제1 언어의 제1 텍스트의 번역을 위한 입력을 수신하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 입력에 기반하여, 상기 제1 텍스트로부터 번역된 제2 언어의 제2 텍스트를 획득하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 전자 문서 내에서, 상기 제2 텍스트를 표시하기 위한 영역의 사이즈를 식별하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 전자 문서 내의 상기 제1 영역의 사이즈 보다 큰 상기 영역의 상기 사이즈에 기반하여, 상기 전자 문서 내의 상기 제1 영역, 및 상기 전자 문서의 수직 방향을 따라 상기 제1 영역에 인접한, 상기 전자 문서 내의 제1 공백 영역을 포함하는, 상기 전자 문서 내의 제2 영역의 사이즈를 식별하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 제2 영역의 상기 사이즈 보다 작은 상기 영역의 상기 사이즈에 기반하여, 상기 제1 영역 및 상기 제1 공백 영역을 포함하는 상기 제2 영역에서 상기 제2 텍스트를 포함하는 상기 전자 문서를 표시하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 제2 영역의 상기 사이즈 보다 큰 상기 영역의 상기 사이즈에 기반하여, 상기 제1 영역, 및 상기 전자 문서의 수평 방향을 따라 상기 제1 영역에 인접한, 상기 전자 문서 내의 제2 공백 영역을 포함하는, 상기 전자 문서 내의 제3 영역에서, 상기 제2 텍스트를 포함하는 상기 전자 문서를 표시하도록, 야기할 수 있다. In one embodiment, a non-transitory computer-readable storage medium storing instructions may be provided. The instructions, when executed by an electronic device including a display, may cause the electronic device to receive an input for translating a first text in a first language contained in a first area within an electronic document. The instructions, when executed by the electronic device, may cause the electronic device to obtain a second text in a second language translated from the first text based on the input. The instructions, when executed by the electronic device, may cause the electronic device to identify a size of an area within the electronic document for displaying the second text. The instructions, when executed by the electronic device, may cause the electronic device to identify a size of the first area within the electronic document, based on a size of the area that is greater than a size of the first area within the electronic document, and a size of a second area within the electronic document, the second area including a first blank area within the electronic document, adjacent to the first area along a vertical direction of the electronic document. The instructions, when executed by the electronic device, may cause the electronic device to display the electronic document including the second text in the second area, including the first area and the first blank area, based on a size of the area that is less than the size of the second area. The instructions, when executed by the electronic device, may cause the electronic device to display the electronic document including the second text in a third area within the electronic document, the third area including the first area and a second blank area within the electronic document, adjacent to the first area along a horizontal direction of the electronic document, based on a size of the area that is greater than the size of the second area.
일 실시예에서, 디스플레이를 포함하는 전자 장치의 방법이 제공될 수 있다. 상기 방법은, 전자 문서 내의 제1 영역 내에 포함된, 제1 언어의 제1 텍스트의 번역을 위한 입력을 수신하는 동작을 포함할 수 있다. 상기 방법은, 상기 입력에 기반하여, 상기 제1 텍스트로부터 번역된 제2 언어의 제2 텍스트를 획득하는 동작을 포함할 수 있다. 상기 방법은, 상기 전자 문서 내에서, 상기 제2 텍스트를 표시하기 위한 영역의 사이즈를 식별하는 동작을 포함할 수 있다. 상기 방법은, 상기 전자 문서 내의 상기 제1 영역의 사이즈 보다 큰 상기 영역의 상기 사이즈에 기반하여, 상기 전자 문서 내의 상기 제1 영역, 및 상기 전자 문서의 수직 방향을 따라 상기 제1 영역에 인접한, 상기 전자 문서 내의 제1 공백 영역을 포함하는, 상기 전자 문서 내의 제2 영역의 사이즈를 식별하는 동작을 포함할 수 있다. 상기 방법은, 상기 제2 영역의 상기 사이즈 보다 작은 상기 영역의 상기 사이즈에 기반하여, 상기 제1 영역 및 상기 공백 영역을 포함하는 상기 제2 영역에서 상기 제2 텍스트를 포함하는 상기 전자 문서를 표시하는 동작을 포함할 수 있다. 상기 방법은, 상기 제2 영역의 상기 사이즈 보다 큰 상기 영역의 상기 사이즈에 기반하여, 상기 제1 영역, 및 상기 전자 문서의 수평 방향을 따라 상기 제1 영역에 인접한, 상기 전자 문서 내의 제2 공백 영역을 포함하는, 상기 전자 문서 내의 제3 영역에서 상기 제2 텍스트를 포함하는 상기 전자 문서를 표시하는 동작을 포함할 수 있다. In one embodiment, a method of an electronic device including a display may be provided. The method may include receiving an input for translating a first text in a first language, the first text included in a first area within an electronic document. The method may include obtaining a second text in a second language, translated from the first text, based on the input. The method may include identifying a size of an area within the electronic document for displaying the second text. The method may include identifying a size of a second area within the electronic document, the second area including the first area within the electronic document and a first blank area within the electronic document adjacent to the first area along a vertical direction of the electronic document, based on a size of the area being larger than a size of the first area within the electronic document. The method may include displaying the electronic document including the second text in the second area, the second area including the first area and the blank area, based on a size of the area being smaller than the size of the second area. The method may include an operation of displaying the electronic document including the second text in a third area within the electronic document, the third area including the first area and a second blank area within the electronic document adjacent to the first area along a horizontal direction of the electronic document, based on the size of the area being greater than the size of the second area.
도 1은, 전자 문서에 대한 번역을 수행하는 전자 장치의 일 실시예를 도시한다. FIG. 1 illustrates one embodiment of an electronic device that performs translation on an electronic document.
도 2는, 일 실시예에 따른, 전자 장치의 개략적인 블록도를 도시한다. FIG. 2 illustrates a schematic block diagram of an electronic device according to one embodiment.
도 3은, 번역 기능을 실행하여 획득된 텍스트가 표시될 전자 문서의 영역을 결정하는 전자 장치의 동작에 대한 흐름도를 도시한다. FIG. 3 illustrates a flowchart of the operation of an electronic device for determining an area of an electronic document in which text obtained by executing a translation function is to be displayed.
도 4는, 전자 문서의 텍스트를 나타내는 오브젝트들을 이용하여 번역 기능을 실행하는 전자 장치의 예시적인 동작을 도시한다. FIG. 4 illustrates an exemplary operation of an electronic device that executes a translation function using objects representing text of an electronic document.
도 5는, 텍스트를 표시하기 위한 배치 알고리즘을 실행하는 전자 장치의 동작에 대한 흐름도를 도시한다. Figure 5 illustrates a flowchart of the operation of an electronic device that executes a layout algorithm for displaying text.
도 6은, 공백 영역을 이용하여 전자 문서 내 텍스트의 영역을 결정하는 전자 장치의 동작에 대한 흐름도를 도시한다. Figure 6 illustrates a flowchart of the operation of an electronic device for determining an area of text within an electronic document using a blank area.
도 7a 및 도 7b는, 텍스트가 표시된 전자 문서 내 영역에 인접한 공백 영역을 탐지하는 전자 장치의 예시적인 동작을 도시한다. Figures 7a and 7b illustrate exemplary operations of an electronic device for detecting a blank area adjacent to an area within an electronic document where text is displayed.
도 8은, 텍스트의 스타일을 변경하는 전자 장치의 동작에 대한 흐름도를 도시한다. Figure 8 illustrates a flowchart of the operation of an electronic device for changing the style of text.
도 9는, 전자 문서의 예시적인 텍스트의 스타일을 변경하는 전자 장치의 예시적인 동작을 도시한다. FIG. 9 illustrates an exemplary operation of an electronic device for changing the style of exemplary text in an electronic document.
도 10은, 텍스트에 인접한, 전자 문서의 다른 콘텐트에 기반하는 전자 장치의 예시적인 동작을 도시한다. FIG. 10 illustrates an exemplary operation of an electronic device based on other content of an electronic document adjacent to text.
도 11은, 텍스트를 포함하는 페이지의 콘텐트를 적어도 부분적으로 변경하는 전자 장치의 동작에 대한 흐름도를 도시한다. FIG. 11 illustrates a flowchart of the operation of an electronic device for at least partially changing the content of a page containing text.
도 12는, 텍스트를 포함하는 페이지의 콘텐트를 적어도 부분적으로 변경하는 전자 장치의 예시적인 동작을 도시한다. FIG. 12 illustrates an exemplary operation of an electronic device that at least partially changes the content of a page containing text.
도 13은, 사용자 입력에 따라, 번역 기능을 실행하기 이전에 표시되었던 전자 문서를 표시하는, 전자 장치의 예시적인 동작을 도시한다. FIG. 13 illustrates an exemplary operation of an electronic device to display an electronic document that was displayed prior to executing a translation function, based on user input.
도 14는, 다양한 실시예들에 따른, 네트워크 환경 내의 전자 장치의 블록도이다. FIG. 14 is a block diagram of an electronic device within a network environment according to various embodiments.
이하, 본 문서의 다양한 실시예들이 첨부된 도면을 참조하여 설명된다. Hereinafter, various embodiments of this document are described with reference to the attached drawings.
본 문서의 다양한 실시 예들 및 이에 사용된 용어들은 본 문서에 기재된 기술을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 해당 실시 예의 다양한 변경, 균등물, 및/또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함할 수 있다. 본 문서에서, "A 또는 B", "A 및/또는 B 중 적어도 하나”, "A, B 또는 C" 또는 "A, B 및/또는 C 중 적어도 하나" 등의 표현은 함께 나열된 항목들의 모든 가능한 조합을 포함할 수 있다. "제 1", "제 2", "첫째" 또는 "둘째" 등의 표현들은 해당 구성요소들을, 순서 또는 중요도에 상관없이 수식할 수 있고, 한 구성요소를 다른 구성요소와 구분하기 위해 사용될 뿐 해당 구성요소들을 한정하지 않는다. 어떤(예: 제 1) 구성요소가 다른(예: 제 2) 구성요소에 "(기능적으로 또는 통신적으로) 연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로 연결되거나, 다른 구성요소(예: 제 3 구성요소)를 통하여 연결될 수 있다. The various embodiments of this document and the terminology used therein are not intended to limit the technology described in this document to a specific embodiment, but should be understood to include various modifications, equivalents, and/or substitutes of the embodiment. In connection with the description of the drawings, similar reference numerals may be used for similar components. The singular expression may include plural expressions unless the context clearly indicates otherwise. In this document, expressions such as "A or B", "at least one of A and/or B", "A, B, or C", or "at least one of A, B, and/or C" may include all possible combinations of the items listed together. Expressions such as "first", "second", "first", or "second" may modify the corresponding components regardless of order or importance, and are only used to distinguish one component from another, but do not limit the corresponding components. When it is said that a component (e.g., a first component) is “(functionally or communicatively) connected” or “connected” to another component (e.g., a second component), said component may be directly connected to said other component, or may be connected via another component (e.g., a third component).
도 1은, 전자 문서(130)에 대한 번역을 수행하는 전자 장치(101)의 일 실시예를 도시한다. 전자 장치(101)는, 전자 문서(130)의 적어도 일부분을 표시하기 위하여, 디스플레이(110)를 제어할 수 있다. 전자 장치(101)에 포함된 예시적인 하드웨어 구성이, 도 2를 참고하여 설명된다. FIG. 1 illustrates an embodiment of an electronic device (101) that performs translation on an electronic document (130). The electronic device (101) can control a display (110) to display at least a portion of the electronic document (130). An exemplary hardware configuration included in the electronic device (101) is described with reference to FIG. 2.
도 1을 참고하면, 전자 문서(130)를 표시한 전자 장치(101)의 예시적인 상태가 도시된다. 전자 장치(101)는 디스플레이(110)의 적어도 일부분 상에 전자 문서(130)의 적어도 일부분을 표시할 수 있다. 예를 들어, 전자 장치(101)는 전자 문서(130) 및/또는 전자 문서(130)를 나타내는 파일(예, 도 2의 파일(280))을 열거나, 실행하거나, 또는 열람하기 위한 입력에 응답하여, 디스플레이(110) 상에 전자 문서(130)의 적어도 일부분을 표시할 수 있다. 전자 장치(101)는, 전자 문서(130)의 표시를 위한 소프트웨어 어플리케이션(이하, 전자 문서 뷰어 및/또는 뷰어 어플리케이션)을 실행하여, 전자 문서(130)의 적어도 일부분을 표시할 수 있다. 예를 들어, 상기 전자 문서(130)는, 전자 장치(101)의 메모리에, 파일로써 저장될 수 있다. 예를 들어, 상기 전자 문서(130)는, 네트워크를 통해 전자 장치(101)와 연결된, 외부 전자 장치(예, 서버)에 저장될 수 있다. 전자 장치(101)는 상기 외부 전자 장치로부터, 전자 문서(130)의 적어도 일부분을 나타내는 비트스트림을 획득할 수 있다. 예를 들어, 전자 문서(130)는, 전자 장치(101)에 저장된 파일, 및/또는 네트워크를 통해 전자 장치(101)로 송신되는, 비트스트림의 형태를 가질 수 있다. Referring to FIG. 1, an exemplary state of an electronic device (101) displaying an electronic document (130) is illustrated. The electronic device (101) may display at least a portion of the electronic document (130) on at least a portion of the display (110). For example, the electronic device (101) may display at least a portion of the electronic document (130) on the display (110) in response to an input for opening, executing, or viewing the electronic document (130) and/or a file representing the electronic document (130) (e.g., file (280) of FIG. 2). The electronic device (101) may display at least a portion of the electronic document (130) by executing a software application for displaying the electronic document (130) (hereinafter, referred to as an electronic document viewer and/or viewer application). For example, the electronic document (130) may be stored as a file in the memory of the electronic device (101). For example, the electronic document (130) may be stored in an external electronic device (e.g., a server) connected to the electronic device (101) via a network. The electronic device (101) may obtain a bitstream representing at least a portion of the electronic document (130) from the external electronic device. For example, the electronic document (130) may be in the form of a file stored in the electronic device (101) and/or a bitstream transmitted to the electronic device (101) via a network.
도 1을 참고하면, 전자 장치(101)는, 디스플레이(110) 상에 뷰어 어플리케이션에 기반하는 UI(user interface)를 표시할 수 있다. 전자 장치(101)는 디스플레이(110)의 상단을 포함하는 표시 영역의 제1 부분(121)에, 타이틀 바 및/또는 상태 바를 표시할 수 있다. 타이틀 바에, 전자 문서(130)의 명칭(예, "A_doc")이 표시될 수 있다. 상태 바에, 배터리의 SOC(state of charge), 현재 시간, 및/또는 WiFi 연결과 같은, 전자 장치(101)의 상태를 나타내는 아이콘들이 표시될 수 있다. Referring to FIG. 1, the electronic device (101) may display a user interface (UI) based on a viewer application on a display (110). The electronic device (101) may display a title bar and/or a status bar on a first portion (121) of a display area including the top of the display (110). The title bar may display a name of an electronic document (130) (e.g., “A_doc”). The status bar may display icons indicating the status of the electronic device (101), such as the state of charge (SOC) of the battery, the current time, and/or a WiFi connection.
도 1을 참고하면, 전자 장치(101)는 디스플레이(110) 상의 제2 부분(122)에, 전자 문서(130)의 적어도 일부분을 표시할 수 있다. 제2 부분(122)이 제1 부분(121) 아래에 위치된 것으로 도시되지만, 부분들(121, 122) 사이의 위치 관계가 실시예에 제한되는 것은 아니다. 제2 부분(122)은, 뷰어 어플리케이션의 브라우저 부분으로 지칭될(referred) 수 있다. 제2 부분(122)을 통하여, 전자 장치(101)는, 제1 텍스트(131)를 포함하는 전자 문서(130)의 콘텐트를 적어도 부분적으로 표시할 수 있다. 제2 부분(122) 상에서 수행된 터치 제스쳐(예, 두 손가락들의 접촉에 기반하는 드래그 제스쳐 및/또는 스와이프 제스쳐)에 응답하여, 전자 장치(101)는 제2 부분(122)을 통해 표시되는 전자 문서(130)의 일부분을, 다른 부분으로 변경할 수 있거나, 또는 교체할 수 있다(예, 스크롤). 제2 부분(122) 상에서 수행된 다른 터치 제스쳐(예, 두 손가락들의 접촉에 기반하는 핀치-투-줌 제스쳐)에 응답하여, 전자 장치(101)는 제2 부분(122)을 통해 표시되는 전자 문서(130)를, 확대할 수 있거나, 또는 축소할 수 있다. Referring to FIG. 1, the electronic device (101) can display at least a portion of an electronic document (130) on a second portion (122) on a display (110). Although the second portion (122) is illustrated as being positioned below the first portion (121), the positional relationship between the portions (121, 122) is not limited to the embodiment. The second portion (122) can be referred to as a browser portion of a viewer application. Through the second portion (122), the electronic device (101) can display at least a portion of the content of the electronic document (130) including the first text (131). In response to a touch gesture performed on the second portion (122) (e.g., a drag gesture and/or a swipe gesture based on contact between two fingers), the electronic device (101) may change or replace a portion of the electronic document (130) displayed through the second portion (122) with another portion (e.g., a scroll). In response to another touch gesture performed on the second portion (122) (e.g., a pinch-to-zoom gesture based on contact between two fingers), the electronic device (101) may zoom in or out of the electronic document (130) displayed through the second portion (122).
도 1을 참고하면, 전자 장치(101)는 디스플레이(110) 상의 제3 부분(123)에, 전자 문서(130)를 편집하기 위한 기능들에 각각 대응하는 실행가능한 객체들(executable objects)을 표시할 수 있다. 제3 부분(123)이 제2 부분(122) 아래에 위치된 것으로 도시되지만, 부분들(122, 123) 사이의 위치 관계가 실시예에 제한되는 것은 아니다. 예를 들어, 제3 부분(123)은, 팝업-윈도우의 형태로, 제2 부분(122) 상에 중첩될 수 있다. 예를 들어, 제3 부분(123)은, 사용자 입력에 기반하여 조건부로(conditionally) 표시될 수 있다. Referring to FIG. 1, the electronic device (101) can display executable objects, each corresponding to a function for editing an electronic document (130), on a third portion (123) on the display (110). Although the third portion (123) is illustrated as being positioned below the second portion (122), the positional relationship between the portions (122, 123) is not limited to the embodiment. For example, the third portion (123) can be overlapped on the second portion (122) in the form of a pop-up window. For example, the third portion (123) can be conditionally displayed based on a user input.
예를 들어, 제3 부분(123)을 통해 표시되는 실행가능한 객체들은, 소프트웨어 키보드(또는 가상 키보드, 또는 전자 장치(101)와 페어링된 실제 키보드)를 통해 입력된 텍스트를, 전자 문서(130)에 추가하기 위한 기능, 전자 문서 상에, 볼펜의 펜 드로잉과 유사한 형태를 가지는 적어도 하나의 획을 추가하기 위한 기능, 전자 문서(130) 상에, 라이너의 펜 드로잉과 유사한 형태를 가지는 적어도 하나이 획을 추가하기 위한 기능, 전자 문서(130)에 추가된 하나 이상의 획들(예, 핸드라이팅(hand-writing) 및/또는 핸드드로잉(hand-drawing)을 표현한 획들)을 제거하기 위한 기능, 전자 문서(130)에 추가된 획들을 선택하기 위한 기능(예, 라쏘(lasso) 기능), 복수의 획들로부터, 특정 폰트를 가지는 텍스트들을 식별하는 기능, 및/또는 전자 문서(130)로 적용된 편집 액션들을 적어도 부분적으로 취소하는 기능에 각각 대응할 수 있다. For example, the executable objects displayed through the third portion (123) may each correspond to a function for adding text entered via a software keyboard (or a virtual keyboard, or a physical keyboard paired with the electronic device (101)) to the electronic document (130), a function for adding at least one stroke having a shape similar to a pen drawing of a ballpoint pen on the electronic document, a function for adding at least one stroke having a shape similar to a pen drawing of a liner on the electronic document (130), a function for removing one or more strokes added to the electronic document (130) (e.g., strokes representing hand-writing and/or hand-drawing), a function for selecting strokes added to the electronic document (130) (e.g., a lasso function), a function for identifying texts having a particular font from a plurality of strokes, and/or a function for at least partially undoing editing actions applied to the electronic document (130).
도 1을 참고하면, 전자 장치(101)는 디스플레이(110) 상의 제4 부분(124)에, 디스플레이(110)를 통해 표시되고 있는 화면(예, 부분들(121, 122, 123)을 포함하고, 뷰어 어플리케이션의 실행에 기반하는, 화면)을, 다른 화면으로 변경하거나, 또는 교체하기 위한 실행가능한 객체들을 표시할 수 있다. 제4 부분(124)을 통해 표시되는 실행가능한 객체들은, 도 1의 상태 내에서 디스플레이(110)를 통해 표시되고 있는 화면 이전에 표시되었던, 다른 화면을 표시하기 위한 기능(예, 뒤로 기능), 런처 화면(또는 홈 화면)으로 지칭되는, 지정된 화면을 표시하기 위한 기능(예, 홈 기능), 및/또는 디스플레이(110) 상에 표시되었던 (또는 전자 장치(101)에 의해 실행되었던) 하나 이상의 화면들의 리스트를 표시하기 위한 기능에 각각 대응할 수 있다. Referring to FIG. 1, the electronic device (101) may display executable objects for changing or replacing a screen (e.g., a screen including parts (121, 122, 123) and based on the execution of a viewer application) being displayed through the display (110) on a fourth portion (124) on the display (110) with another screen. The executable objects displayed through the fourth portion (124) may each correspond to a function for displaying another screen that was displayed before the screen being displayed through the display (110) within the state of FIG. 1 (e.g., a back function), a function for displaying a designated screen referred to as a launcher screen (or home screen) (e.g., a home function), and/or a function for displaying a list of one or more screens that were displayed on the display (110) (or executed by the electronic device (101).
도 1을 참고하면, 제1 언어(예, 한국어)의(in a first language) 제1 텍스트(131)를 표시하는 전자 장치(101)의 예시적인 상태가 도시된다. 전자 장치(101)는 상기 제1 텍스트(131)의 번역을 위한 제1 입력을 수신할 수 있다. 예를 들어, 전자 장치(101)는, 제1 텍스트(131)를 선택하기 위한 입력을 수신할 수 있다. Referring to FIG. 1, an exemplary state of an electronic device (101) displaying a first text (131) in a first language (e.g., Korean) is illustrated. The electronic device (101) may receive a first input for translating the first text (131). For example, the electronic device (101) may receive an input for selecting the first text (131).
예를 들어, 제1 텍스트(131)를 선택하기 위한 입력은, 제1 텍스트(131)가 표시된 디스플레이(110)의 일부분 상에서 수행된, 드래그 제스쳐에 기반하여, 탐지될 수 있다. 상기 드래그 제스쳐는, 제1 텍스트(131)를 감싸거나, 및/또는 제1 텍스트(131)가 표시된 방향(예, 수평 방향)을 따라 드래그되는, 디스플레이(110) 상의 손가락의 경로(path 또는 trajectory)에 기반하여 탐지될 수 있다. 상기 입력은, 제1 텍스트(131)가 표시된 디스플레이(110)의 일부분 상에서 수행된 탭 제스쳐(또는 더블 탭 제스쳐, 또는 1.5 초와 같은 지정된 시간을 초과하여 디스플레이(110) 상에 접촉된 손가락에 기반하여 탐지된, 롱-터치 제스쳐)에 기반하여, 탐지될 수 있다. 상기 입력은, 디스플레이(110) 상에 표시된 실행가능한 객체(예, 전자 문서(130)의 전체 및/또는 전자 문서(130)의 일부분(예, 단락)에 대한 번역 기능을 실행하기 위한 시각적 객체)의 선택을 나타내는 입력을 포함할 수 있다. 상기 입력은, 제1 텍스트(131)의 번역을 나타내는 발언(예, "화면에 표시된 텍스트를 번역해줘")을 포함하는 오디오 신호에 기반하여, 탐지될 수 있다. 상기 오디오 신호는, 상기 발언과 함께, 전자 장치(101)의 음성 처리를 위한 예약어(reserved word)(또는 스팟 키워드)(예, "헤이 빅스비")를 더 포함할 수 있다. For example, an input for selecting a first text (131) may be detected based on a drag gesture performed over a portion of the display (110) on which the first text (131) is displayed. The drag gesture may be detected based on a path or trajectory of a finger on the display (110) that wraps around the first text (131) and/or is dragged along a direction (e.g., horizontal direction) in which the first text (131) is displayed. The input may be detected based on a tap gesture (or double tap gesture, or a long-touch gesture, detected based on a finger remaining in contact with the display (110) for more than a specified time, such as 1.5 seconds) performed over a portion of the display (110) on which the first text (131) is displayed. The input may include an input indicating a selection of an executable object displayed on the display (110) (e.g., a visual object for executing a translation function for the entire electronic document (130) and/or a portion (e.g., a paragraph) of the electronic document (130). The input may be detected based on an audio signal including an utterance indicating a translation of the first text (131) (e.g., “Translate the text displayed on the screen”). The audio signal may further include, together with the utterance, a reserved word (or spot keyword) for voice processing of the electronic device (101) (e.g., “Hey Bixby”).
도 1을 참고하면, 제1 텍스트(131)의 번역을 위한 입력을 수신한 전자 장치(101)는, 상기 번역과 관련된 설정 값을 수신하기 위한 팝업 메뉴(140)를 표시할 수 있다. 팝업 메뉴(140)는, 상기 입력을 수신한 디스플레이(110) 상의 지점(예, 탭 제스쳐를 수행하기 위하여 디스플레이(110) 상에 접촉되었던 손가락의 위치에 대응하는 지점), 및/또는 상기 지점과 인접한 디스플레이(110)의 다른 지점 상에 표시될 수 있다. 팝업 메뉴(140)의 형태, 사이즈, 및/또는 팝업 메뉴(140)가 표시되는 위치가, 상술된 위치에 제한되는 것은 아니다. Referring to FIG. 1, an electronic device (101) that receives an input for translating a first text (131) may display a pop-up menu (140) for receiving setting values related to the translation. The pop-up menu (140) may be displayed on a point on the display (110) that received the input (e.g., a point corresponding to a position of a finger that was in contact with the display (110) to perform a tap gesture) and/or on another point on the display (110) adjacent to the point. The shape, size, and/or location at which the pop-up menu (140) is displayed are not limited to the above-described locations.
도 1을 참고하면, 전자 장치(101)는 팝업 메뉴(140)를 통하여, 제1 텍스트(131)(또는 전자 문서(130)에 포함된 모든 텍스트들)를 번역하기 위하여 요구되는 정보를 획득할 수 있거나, 또는 표시할 수 있다. 상기 정보는, 전자 장치(101)에 의해 제공되는 번역 서비스에 의해 번역될, 제1 텍스트(131)의 제1 언어(또는 소스 언어), 상기 번역 서비스의 결과로써 제공될, 다른 텍스트의 언어(예, 타겟 언어)를 포함할 수 있다. 일 실시예에서, 전자 장치(101)는, 제1 텍스트(131)의 제1 언어(예, 한국어)를 (자동적으로) 탐지할 수 있거나, 또는 결정할 수 있다. 전자 장치(101)는, 팝업 메뉴(140)를 통해, 소스 언어 및/또는 타겟 언어를 변경하기 위한 입력을 수신할 수 있다. Referring to FIG. 1, the electronic device (101) may obtain or display information required to translate the first text (131) (or all texts included in the electronic document (130)) through a pop-up menu (140). The information may include a first language (or source language) of the first text (131) to be translated by a translation service provided by the electronic device (101), and a language (e.g., target language) of another text to be provided as a result of the translation service. In one embodiment, the electronic device (101) may (automatically) detect or determine the first language (e.g., Korean) of the first text (131). The electronic device (101) may receive an input for changing the source language and/or target language through the pop-up menu (140).
도 1을 참고하면, 한국어로부터 영어로의 번역을 수행하는 전자 장치(101)의 예시적인 동작이 도시된다. 전자 장치(101)는, 팝업 메뉴(140) 내에, 한국어로부터 영어로의 번역을 수행함을 나타내는 텍스트(예, "Korean → English")를 표시할 수 있다. 전자 장치(101)는, 팝업 메뉴(140) 내에서 상기 텍스트와 함께, 팝업 메뉴(140)의 표시를 중단하는 아이콘(예, "x"의 형태를 가지는 도형을 포함하는 아이콘)을 표시할 수 있다. 상기 아이콘을 선택하는 입력에 기반하여, 전자 장치(101)는 팝업 메뉴(140)를 표시하는 것을 적어도 일시적으로 중단할 수 있다. 일 실시예에서, 전자 장치(101)는 상기 입력에 기반하여, 제1 텍스트(131)를 번역하는 것을 중단할 수 있다. 상기 입력이, 제1 텍스트(131)의 번역의 완료 이후 수신된 경우, 전자 장치(101)는, 디스플레이(110)로부터 팝업 메뉴(140)를 숨기고, 디스플레이(110) 상에 제1 텍스트(131)의 번역 결과를 표시하는 것을 중단할 수 있다. Referring to FIG. 1, an exemplary operation of an electronic device (101) performing translation from Korean to English is illustrated. The electronic device (101) may display text (e.g., "Korean → English") within a pop-up menu (140) indicating that translation from Korean to English is performed. The electronic device (101) may display an icon (e.g., an icon including a shape in the shape of an "x") for stopping the display of the pop-up menu (140) along with the text within the pop-up menu (140). Based on an input selecting the icon, the electronic device (101) may at least temporarily stop displaying the pop-up menu (140). In one embodiment, the electronic device (101) may stop translating the first text (131) based on the input. If the above input is received after the completion of the translation of the first text (131), the electronic device (101) can hide the pop-up menu (140) from the display (110) and stop displaying the translation result of the first text (131) on the display (110).
도 1을 참고하면, 제1 언어의 제1 텍스트(131)의 번역을 위한 입력에 기반하여, 전자 장치(101)는, 제1 언어의 제1 텍스트(131)로부터 번역된, 제2 언어의 제2 텍스트(150)를 획득할 수 있다. 제1 텍스트(131)를 번역하는 동작(또는 제1 텍스트(131)에 대한 번역 기능)은, 제1 텍스트(131)의 콘텐트를 유지하면서(예, 문맥(context), 문맥적 의미, 의도, 및/또는 의미론적 표상(semantic representation)), 제1 텍스트(131)의 제1 언어와 상이한 제2 언어에 의해 정의된 문자, 단어, 및/또는 문장을 포함하는, 제2 텍스트(150)를 생성하거나, 및/또는 획득하는 동작을 포함할 수 있다. 예를 들어, 제2 언어의 제2 텍스트(150)는, 제1 언어의 제1 텍스트(131)의 문맥적 의미를 가질 수 있다. 전자 장치(101)가 전자 문서(130)에 포함된 텍스트들을 적어도 부분적으로 번역하는 예시적인 동작이, 도 4를 참고하여 설명된다. Referring to FIG. 1, based on an input for translating a first text (131) in a first language, the electronic device (101) may obtain a second text (150) in a second language, translated from the first text (131) in the first language. The operation of translating the first text (131) (or the translation function for the first text (131)) may include an operation of generating and/or obtaining a second text (150) that includes characters, words, and/or sentences defined by a second language different from the first language of the first text (131), while maintaining the content of the first text (131) (e.g., context, contextual meaning, intent, and/or semantic representation). For example, the second text (150) in the second language may have the contextual meaning of the first text (131) in the first language. An exemplary operation of an electronic device (101) to at least partially translate texts contained in an electronic document (130) is described with reference to FIG. 4.
도 1을 참고하면, 예시적인 너비 w1 및 높이 h1를 가지는 영역 내에 포함된(또는 영역 상에 위치된, 또는 영역에서(at) 위치된), 제1 언어(예, 한국어)의 제1 텍스트(131)(예, "트레이 분리 판이 트레이의 홈과 수직이 되도록 사용하지 않으면 제품이 손상될 수 있습니다.")의 번역을 위한 입력을 수신한 전자 장치(101)의 예시적인 상태가 도시된다. 예를 들어, 팝업 메뉴(140)를 통해 수신된 상기 입력에 기반하여, 전자 장치(101)는, 제1 텍스트로부터 번역된 제2 언어(예, 영어)의 제2 텍스트(151)(예, "Ensure that the ejection pin is perpendicular to the hole. Otherwise, the device may be damaged.")를 획득할 수 있다. 제1 언어 및 제2 언어가 서로 다른 문자들, 및/또는 작성 규칙들을 가지기 때문에, 제1 언어의 제1 텍스트(131), 및 제1 텍스트(131)로부터 번역된 제2 텍스트(151)는, 같은 의미를 가짐에도 불구하고, 다른 길이들을 가질 수 있다. 예를 들어, 제2 텍스트(151)의 길이는, 제1 텍스트(131)의 길이 보다 짧을 수 있다. 예를 들어, 제2 텍스트(151)의 길이는, 제1 텍스트(131)의 길이 보다 길 수 있다. Referring to FIG. 1, an exemplary state of an electronic device (101) is illustrated that receives an input for translation of a first text (131) in a first language (e.g., Korean) (e.g., “If the tray separator plate is not used so that it is perpendicular to the groove of the tray, the product may be damaged.”) contained within (or positioned on) an area having an exemplary width w1 and height h1. Based on the input received, for example, through a pop-up menu (140), the electronic device (101) may obtain a second text (151) in a second language (e.g., English) translated from the first text (e.g., “Ensure that the ejection pin is perpendicular to the hole. Otherwise, the device may be damaged.”). Because the first and second languages have different characters and/or writing rules, the first text (131) in the first language and the second text (151) translated from the first text (131) may have different lengths, even though they have the same meaning. For example, the length of the second text (151) may be shorter than the length of the first text (131). For example, the length of the second text (151) may be longer than the length of the first text (131).
도 1을 참고하면, 제1 언어의 제1 텍스트(131)로부터, 상기 제1 텍스트(131)의 길이 보다 긴 길이를 가지는, 제2 언어의 제2 텍스트(151)를 획득한 일 실시예가 도시된다. 제2 언어의 제2 텍스트(151)에 포함된 문자들의 개수가, 제1 언어의 제1 텍스트(131)에 포함된 문자들의 개수 보다 많을 수 있다. 제1 텍스트(131)의 길이 보다 긴 길이를 가지는 제2 텍스트(151)는, 제2 텍스트(151)를 표시하기 위하여, 제1 텍스트(131)에 의해 점유되는 전자 문서(130)의 영역 보다 넓은 영역을 점유할 수 있다. Referring to FIG. 1, an embodiment of obtaining a second text (151) of a second language, which has a length longer than the length of the first text (131) of a first language, is illustrated. The number of characters included in the second text (151) of the second language may be greater than the number of characters included in the first text (131) of the first language. The second text (151) having a length longer than the length of the first text (131) may occupy a wider area of the electronic document (130) than the area occupied by the first text (131) in order to display the second text (151).
일 실시예에 따른, 전자 장치(101)는, 전자 문서(130) 내에서, 제2 텍스트(151)를 표시하기 위한 영역의 사이즈를 식별할 수 있다. 도 1을 참고하면, 제1 텍스트(131)는, 전자 문서(130) 내에서, 너비 w1 및 높이 h1를 가지는 영역을 통해 표시될 수 있다. 한편, 제2 텍스트(151)는, 제1 텍스트(131)가 표시되는 영역의 너비 w1 보다 큰 너비 w2, 및 제1 텍스트(131)가 표시되는 영역의 높이 h1 보다 큰 높이 h2를 가지는 영역을 통해 표시될 수 있다. 전자 장치(101)는, 전자 문서(130)를 표시하기 위한 동작(예, 전자 문서(130)의 렌더링)을 수행하기 이전에, 제2 텍스트(151)를 표시하기 위한 전자 문서(130)의 영역의 사이즈를 예측할 수 있거나, 또는 측정(measure)할 수 있다. According to one embodiment, the electronic device (101) may identify the size of an area for displaying second text (151) within an electronic document (130). Referring to FIG. 1, the first text (131) may be displayed through an area having a width w1 and a height h1 within the electronic document (130). Meanwhile, the second text (151) may be displayed through an area having a width w2 greater than the width w1 of the area for displaying the first text (131) and a height h2 greater than the height h1 of the area for displaying the first text (131). The electronic device (101) may predict or measure the size of an area of the electronic document (130) for displaying the second text (151) before performing an operation for displaying the electronic document (130) (e.g., rendering the electronic document (130).
일 실시예에서, 제1 텍스트(131)가 포함된, 전자 문서(130) 내의 제1 영역의 사이즈 보다 큰, 제2 텍스트(151)를 표시하기 위한 영역의 사이즈에 기반하여, 전자 장치(101)는, 전자 문서(130) 내의 상기 제1 영역, 및 전자 문서(130) 내의 상기 제1 영역에 인접한 전자 문서(130) 내의 공백(blank) 영역을 식별할 수 있다. 본 개시에서 공백 영역은, 전자 문서(130) 내에서 어느 콘텐트(예, 이미지, 텍스트, 및/또는 테이블)도 위치되지 않은 영역을 지칭할 수 있다. 전자 장치(101)는, 상기 제1 영역, 및 상기 공백 영역을 포함하는, 제2 영역의 사이즈를 식별할 수 있다. 상기 제2 영역의 사이즈가, 제2 텍스트(151)를 표시하기 위하여 측정된, 상기 영역의 상기 사이즈 보다 작은 경우, 전자 장치(101)는, 상기 제2 영역에서 제2 텍스트(151)를 포함하는, 전자 문서(130)를 표시할 수 있다. In one embodiment, based on the size of an area for displaying second text (151) that is larger than the size of a first area within an electronic document (130) including first text (131), the electronic device (101) may identify the first area within the electronic document (130) and a blank area within the electronic document (130) adjacent to the first area within the electronic document (130). In the present disclosure, a blank area may refer to an area within the electronic document (130) where no content (e.g., an image, text, and/or a table) is positioned. The electronic device (101) may identify the size of the first area and a second area including the blank area. When the size of the second area is smaller than the size of the area measured for displaying the second text (151), the electronic device (101) may display the electronic document (130) including the second text (151) in the second area.
도 1의 예시적인 전자 문서(130)를 참고하면, 전자 장치(101)는, 제1 텍스트(131)가 배치된 전자 문서(130)에 인접한, 공백 영역(또는 여백(margin) 영역 또는 패딩(padding) 영역)을 식별할 수 있거나, 또는 체크할 수 있다. 전자 장치(101)는, 제2 텍스트(151)를, 상기 제1 텍스트(131)가 표시되었던, 제1 영역, 및 상기 제1 영역에 인접한 공백 영역에 표시할 수 있다. 예를 들어, 제2 텍스트(151)가 표시된 전자 문서의 영역은, 상기 제1 영역이 상기 공백 영역을 향하여 수평 방향으로, 또는 수직 방향으로 확대된 것과 같은, 형태를 가질 수 있다. Referring to the exemplary electronic document (130) of FIG. 1, the electronic device (101) can identify or check a blank area (or margin area or padding area) adjacent to the electronic document (130) in which the first text (131) is placed. The electronic device (101) can display the second text (151) in the first area where the first text (131) was displayed and in the blank area adjacent to the first area. For example, the area of the electronic document in which the second text (151) is displayed can have a shape such that the first area is expanded horizontally or vertically toward the blank area.
예를 들어, 전자 문서(130) 내의 텍스트를 표시하기 위한 영역의 사이즈가 번역 기능에 의해 증가될 시, 전자 문서(130)의 콘텐트의 가독성이 감소될 수 있다. 예를 들어, 번역된 텍스트가 다른 콘텐트와 중첩되거나, 다른 콘텐트를 가릴 수 있다. For example, when the size of an area for displaying text within an electronic document (130) is increased by a translation function, the readability of the content of the electronic document (130) may be reduced. For example, the translated text may overlap with other content or obscure other content.
상술한 바와 같이, 일 실시예에 따른, 전자 장치(101)는, 전자 문서(130)의 가독성을, 번역 기능을 실행과 독립적으로 유지하기 위하여, 번역된 텍스트의 사이즈에 기반하여, 전자 문서(130)의 콘텐트의 배열, 레이아웃, 및/또는 형태를 변경할 수 있거나, 또는 조절할 수 있다. 번역 기능에 의해 전자 문서(130)의 가독성이 감소되는지 여부를 판단하는 전자 장치(101)의 예시적인 동작이, 도 3을 참고하여 설명된다. 변경된 배열에 따라 전자 문서(130)의 콘텐트를 표시하여, 전자 장치(101)는, 번역된 텍스트가 자연스럽게 배치된, 전자 문서(130)를 표시할 수 있다. 번역된 텍스트가 자연스럽게 배치된, 전자 문서(130)를 생성하거나, 또는 표시하기 위한 전자 장치(101)의 예시적인 동작이, 도 5 내지 도 12를 참고하여 설명된다. 예를 들어, 전자 문서(130) 내에서, 번역된 텍스트가 다른 콘텐트와 중첩되지 않거나, 또는 다른 콘텐트로부터 이격될 수 있다. 번역된 텍스트가 자연스럽게 배치된 전자 문서(130)를 표시하여, 전자 장치(101)는, 전자 문서(130)와 관련된 사용자 경험을 개선할 수 있거나, 또는 번역 기능을 실행하기 이전의 전자 문서(130)에 대한 사용자 경험 및/또는 전자 문서(130)의 사용성을 유지할 수 있다. 번역 기능을 실행하기 이전의 텍스트(예, 원문) 및 번역 기능을 실행하여 획득된 텍스트(예, 번역문) 사이의 전환을 지원하는 전자 장치(101)의 일 실시예가 도 13을 참고하여 설명된다. As described above, according to one embodiment, the electronic device (101) can change or adjust the arrangement, layout, and/or form of the content of the electronic document (130) based on the size of the translated text, in order to maintain the readability of the electronic document (130) independently from the execution of the translation function. An exemplary operation of the electronic device (101) for determining whether the readability of the electronic document (130) is reduced by the translation function is described with reference to FIG. 3. By displaying the content of the electronic document (130) according to the changed arrangement, the electronic device (101) can display the electronic document (130) in which the translated text is naturally arranged. An exemplary operation of the electronic device (101) for generating or displaying the electronic document (130) in which the translated text is naturally arranged is described with reference to FIGS. 5 to 12. For example, within an electronic document (130), translated text may not overlap with other content, or may be spaced apart from other content. By displaying an electronic document (130) in which the translated text is naturally arranged, the electronic device (101) may improve the user experience associated with the electronic document (130), or maintain the user experience and/or usability of the electronic document (130) prior to executing the translation function. An embodiment of an electronic device (101) that supports switching between text prior to executing the translation function (e.g., original text) and text obtained by executing the translation function (e.g., translated text) is described with reference to FIG. 13 .
이하에서는, 도 2를 참고하여, 일 실시예에 따른, 전자 장치(101)의 예시적인 하드웨어 구성, 및 상기 하드웨어 구성에 기반하여 실행되는 하나 이상의 프로그램들이 설명된다. Hereinafter, with reference to FIG. 2, an exemplary hardware configuration of an electronic device (101) according to one embodiment and one or more programs executed based on the hardware configuration are described.
도 2는, 일 실시예에 따른, 전자 장치(101)의 개략적인 블록도를 도시한다. 도 2의 전자 장치(101)는, 도 1의 전자 장치(101)를 포함할 수 있다. 도 2를 참고하면, 전자 장치(101)는, 랩톱 PC(personal computer)(290), 다양한 폼 팩터들을 가지는 스마트폰들(291)(예, 도 1의 전자 장치(101)의 모습을 가지는, 바 타입의 스마트폰(291-1), 폴더블 타입의 스마트폰(291-2), 또는 슬라이더블(또는 롤러블) 타입의 스마트폰(291-3)), 태블릿 PC(292), HMD(head-mounted display)(또는 head-wearable device) 장치(293), 워치(294), 및 기타 유사 컴퓨팅 장치들(미도시)과 같은, 다양한 형태들의 전자 장치들 중 하나일 수 있다. FIG. 2 illustrates a schematic block diagram of an electronic device (101) according to one embodiment. The electronic device (101) of FIG. 2 may include the electronic device (101) of FIG. 1. Referring to FIG. 2, the electronic device (101) may be one of various forms of electronic devices, such as a laptop PC (personal computer) (290), smartphones (291) having various form factors (e.g., a bar-type smartphone (291-1), a foldable-type smartphone (291-2), or a sliderable (or rollable) type smartphone (291-3) having the appearance of the electronic device (101) of FIG. 1), a tablet PC (292), a head-mounted display (HMD) (or head-wearable device) device (293), a watch (294), and other similar computing devices (not shown).
일 실시예에서, 전자 장치(101)는, 모바일 장치, 사용자 장치(user equipment, UE)(또는 사용자 단말(user terminal)), 다기능 장치, 휴대용 통신 장치, 휴대용 장치, 또는 서버로 참조될 수 있다. 전자 장치(101)의 폼 팩터는, 도 2에 도시된 예시적인 폼 팩터들에 제한되지 않는다. 예를 들어, 전자 장치(101)는, 차량(예, 전기 자동차(electric vehicle, EV)) 내에서, ECU(electronic control unit)로써 포함될 수 있다. 예를 들어, 전자 장치(101)는, 외부로 빛을 투사하기 위한 프로젝터를 포함할 수 있다. 예를 들어, 전자 장치(101)는, 전자 문서(예, 도 1의 전자 문서(130))를 출력하기 위한 어느 적합한 형태를 가질 수 있다. 예를 들어, 전자 장치(101)는, 전자 문서가 종이와 같은 물체의 표면 상에 그려지도록, 잉크(또는 토너)를 출력하는 프린터를 포함할 수 있다. 본 개시에서, 전자 문서를 표시하는 전자 장치(101)의 동작은, 디스플레이(110)를 통해 전자 문서를 시각화하는 동작 뿐만 아니라, 외부 객체의 표면 상에 전자 문서의 적어도 일부분을 출력하는 동작을 포함할 수 있다. In one embodiment, the electronic device (101) may be referred to as a mobile device, a user equipment (UE) (or user terminal), a multi-function device, a portable communication device, a portable device, or a server. The form factor of the electronic device (101) is not limited to the exemplary form factors illustrated in FIG. 2. For example, the electronic device (101) may be included as an electronic control unit (ECU) in a vehicle (e.g., an electric vehicle (EV)). For example, the electronic device (101) may include a projector for projecting light to the outside. For example, the electronic device (101) may have any suitable form for outputting an electronic document (e.g., the electronic document 130 of FIG. 1). For example, the electronic device (101) may include a printer that outputs ink (or toner) so that the electronic document can be drawn on a surface of an object such as paper. In the present disclosure, the operation of an electronic device (101) displaying an electronic document may include an operation of visualizing the electronic document through a display (110), as well as an operation of outputting at least a portion of the electronic document on a surface of an external object.
도 2를 참고하면, 일 실시예에 따른, 전자 장치(101)는, 프로세서(210), 및/또는 메모리(220)를 포함할 수 있다. 전자 장치(101)는 디스플레이(110)를 더 포함할 수 있다. 프로세서(210)는, 메모리(220) 및/또는 디스플레이(110)와 전기적으로, 및/또는 작동적으로 결합할 수 있다. 전자 부품들이 전기적으로 결합하는 것은, 신호의 송신을 위한 유선의 신호 경로(또는 무선 통신을 위한 연결)가 전자 부품들 사이에 수립된 상태를 포함할 수 있다. 전자 부품들이 작동적으로 결합하는 것은, 상기 전자 부품들 중 어느 한 전자 부품에 의해 다른 전자 부품이 제어되도록, 상기 전자 부품들이 직접적으로 결합된 상태(또는 상기 전자 부품들이 간접적으로 결합된 상태)를 포함할 수 있다. 도 2를 참고하면, 통신 버스(202)로 지칭되는, 전자 부품에 기반하는, 프로세서(210), 메모리(220), 및 디스플레이(110) 사이의 전기적인 연결이 개략적으로 도시된다. 통신 버스(202)를 통하여, 프로세서(210), 메모리(220), 및 디스플레이(110)가 통신적으로 결합될 수 있다. Referring to FIG. 2, according to one embodiment, an electronic device (101) may include a processor (210) and/or a memory (220). The electronic device (101) may further include a display (110). The processor (210) may be electrically and/or operatively coupled with the memory (220) and/or the display (110). Electrical coupling of the electronic components may include a state in which a wired signal path (or a connection for wireless communication) for transmitting signals is established between the electronic components. Operationally coupling of the electronic components may include a state in which the electronic components are directly coupled (or a state in which the electronic components are indirectly coupled) such that one of the electronic components controls another electronic component. Referring to FIG. 2, an electrical connection between the processor (210), the memory (220), and the display (110) based on electronic components, referred to as a communication bus (202), is schematically illustrated. Through a communication bus (202), the processor (210), memory (220), and display (110) can be communicatively coupled.
도 2를 참고하면, 전자 장치(101)의 프로세서(210)는, 데이터에 대한 연산(예, 산술적 연산 및/또는 논리적 연산)을 수행하기 위한 회로(예, 처리 회로 및/또는 코어)를 포함할 수 있다. 상기 연산을 나타내는 이진 코드(예, 인스트럭션)가 프로세서(210)로 입력될 수 있다. 프로세서(210)는, CPU(central processing unit), GPU(graphic processing unit), 및/또는 NPU(neural processing unit)를 포함할 수 있다. 프로세서(210)는, AP(application processor) 및/또는 SoC(system on a chip)로 지칭될 수 있다. 프로세서(210)는, 복수의 인스트럭션들을 동시에 로드(또는 페치(fetch)) 및/또는 실행하기 위한 구조(예, 듀얼 코어(dual core), 쿼드 코어(quad core), 헥사 코어(hexa core), 또는 옥타 코어(octa core)와 같은 복수의 코어 회로들의 조합에 기반하는, 멀티-코어 구조)를 가질 수 있다. 프로세서(210)를 포함하는 적어도 하나의 프로세서를 포함하는 전자 장치(101) 내에서, 상기 적어도 하나의 프로세서는, 본 개시의 동작들을 개별적으로, 또는 집합적으로(collectively) 수행할 수 있다. 예를 들어, 적어도 하나의 프로세서는, 메모리(220)에 저장된 인스트럭션들을 실행하여, 도 3, 도 5, 도 6, 도 8, 도 11, 및/또는 도 13의 동작들을 개별적으로 및/또는 집합적으로 수행할 수 있다. Referring to FIG. 2, a processor (210) of an electronic device (101) may include circuits (e.g., processing circuits and/or cores) for performing operations (e.g., arithmetic operations and/or logical operations) on data. Binary codes (e.g., instructions) representing the operations may be input to the processor (210). The processor (210) may include a central processing unit (CPU), a graphic processing unit (GPU), and/or a neural processing unit (NPU). The processor (210) may be referred to as an application processor (AP) and/or a system on a chip (SoC). The processor (210) may have a structure (e.g., a multi-core structure based on a combination of multiple core circuits such as a dual core, a quad core, a hexa core, or an octa core) for loading (or fetching) and/or executing multiple instructions simultaneously. Within an electronic device (101) comprising at least one processor, including a processor (210), the at least one processor may individually or collectively perform the operations of the present disclosure. For example, the at least one processor may individually and/or collectively perform the operations of FIG. 3, FIG. 5, FIG. 6, FIG. 8, FIG. 11, and/or FIG. 13 by executing instructions stored in the memory (220).
도 2의 메모리(220)는, 프로세서(210)로 입력되거나, 또는 프로세서(210)로부터 출력되는 데이터(또는 인스트럭션들)를 저장하기 위한 회로를 포함할 수 있다. 메모리(220)는, RAM(random-access memory)과 같은 휘발성 메모리(volatile memory), 및/또는 ROM(read-only memory)과 같은 비휘발성 메모리(non-volatile memory)를 포함할 수 있다. 비휘발성 메모리는 스토리지로 지칭될 수 있다. 휘발성 메모리는, 예를 들어, DRAM(dynamic RAM), SRAM(static RAM), Cache RAM, PSRAM (pseudo SRAM) 중 적어도 하나를 포함할 수 있다. 비휘발성 메모리는, 예를 들어, PROM(programmable ROM), EPROM (erasable PROM), EEPROM (electrically erasable PROM), 플래시 메모리, 하드디스크, 컴팩트 디스크, SSD(solid state drive), eMMC(embedded multimedia card) 중 적어도 하나를 포함할 수 있다. 메모리(220)는 전자 장치(101)에 분산 방식으로 위치된 하나 이상의 저장 매체들(예, 상술된 휘발성 메모리 및/또는 비휘발성 메모리)을 포함할 수 있다. 전자 장치(101)의 프로세서(210)는, 상기 전자 장치(101) 내 메모리(220)의 인스트럭션들을 실행하여, 상기 인스트럭션들에 의해 나타나는 기능, 및/또는 동작(예, 도 3, 도 5, 도 6, 도 8, 도 11, 및/또는 도 13의 동작들)을 수행할 수 있다. The memory (220) of FIG. 2 may include a circuit for storing data (or instructions) input to or output from the processor (210). The memory (220) may include volatile memory, such as random-access memory (RAM), and/or non-volatile memory, such as read-only memory (ROM). The non-volatile memory may be referred to as storage. The volatile memory may include, for example, at least one of dynamic RAM (DRAM), static RAM (SRAM), cache RAM, and pseudo SRAM (PSRAM). The non-volatile memory may include, for example, at least one of programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), flash memory, hard disk, compact disc, solid state drive (SSD), and embedded multimedia card (eMMC). The memory (220) may include one or more storage media (e.g., the volatile memory and/or non-volatile memory described above) located in a distributed manner in the electronic device (101). The processor (210) of the electronic device (101) may execute instructions of the memory (220) within the electronic device (101) to perform functions and/or operations indicated by the instructions (e.g., the operations of FIGS. 3, 5, 6, 8, 11, and/or 13).
전자 장치(101)의 디스플레이(110)는, 프로세서(210)로부터 제공된 정보를 시각화하기 위한 회로를 포함할 수 있다. 디스플레이(110)는 LCD(liquid crystal display), PDP(plasma display panel), 및/또는 LED들(light emitting diodes)을 포함할 수 있다. 상기 LED는 OLED(organic LED)를 포함할 수 있다. 실시예가 이에 제한되는 것은 아니며, 디스플레이(110)는, 전자 종이를 포함할 수 있다. 디스플레이(110)의 표시 영역(또는 액티브 영역)은, 디스플레이(110)의 픽셀들(예, 활성화된 픽셀들)에 의해 형성된, 광이 방사되는 영역을 포함할 수 있다. 디스플레이(110)는, 디스플레이(110) 상의 외부 객체(예, 사용자의 손가락)를 탐지하기 위한 센서(예, 터치 센서)를 포함할 수 있다. 상기 센서는 패널(예, TSP(touch sensor panel))의 형태로, 디스플레이(110)에 포함될 수 있다. The display (110) of the electronic device (101) may include a circuit for visualizing information provided from the processor (210). The display (110) may include a liquid crystal display (LCD), a plasma display panel (PDP), and/or light emitting diodes (LEDs). The LEDs may include organic LEDs (OLEDs). The embodiment is not limited thereto, and the display (110) may include electronic paper. The display area (or active area) of the display (110) may include an area where light is emitted, formed by pixels (e.g., activated pixels) of the display (110). The display (110) may include a sensor (e.g., a touch sensor) for detecting an external object (e.g., a user's finger) on the display (110). The sensor may be included in the display (110) in the form of a panel (e.g., a touch sensor panel (TSP)).
도 2를 참고하면, 전자 문서를 나타내는 파일(280)을 생성하거나, 판독하기 위하여 프로세서(210)에 의해 실행되는, 프로그램들(예, 뷰어 어플리케이션(260), 및/또는 전자 문서 라이브러리(250))이 도시된다. 상기 프로그램들은, 독립적으로 메모리(220) 내에 설치될 수 있거나(예, 패키지로 지칭되는, 인스트럭션들, 및 리소스의 집합), 단일 프로그램의 서브-루틴(또는 애플릿(applet) 또는 DLL(dynamic link library))으로써, 메모리(220) 내에 저장될 수 있다. Referring to FIG. 2, programs (e.g., a viewer application (260) and/or an electronic document library (250)) are illustrated that are executed by a processor (210) to create or read a file (280) representing an electronic document. The programs may be independently installed in memory (220) (e.g., a collection of instructions and resources, referred to as a package) or may be stored in memory (220) as sub-routines of a single program (or an applet or a dynamic link library (DLL)).
예를 들어, 뷰어 어플리케이션(260)을 실행한 프로세서(210)는, 파일(280)에 의해 나타나는 전자 문서의 적어도 일부분을 포함하는, 상기 뷰어 어플리케이션(260)의 UI(예, 도 1에 도시된 UI)를, 디스플레이(110) 상에 표시할 수 있다. 프로세서(210)는, 파일(280)의 오픈 및/또는 브라우징을 위한 입력에 응답하여, 뷰어 어플리케이션(260)을 실행할 수 있다. 뷰어 어플리케이션(260)을 실행한 프로세서(210)는, 전자 문서의 적어도 일부분(예, 디스플레이(110) 및/또는 브라우저 부분의 형태, 및/또는 사이즈에 대응하는 일부분)이 표시되도록, 전자 문서 라이브러리(250)에 포함된 렌더링 엔진(251)을 실행할 수 있다. 전자 문서 라이브러리(250)는, PDF에 기반하는 파일(280)을 처리하기 위한 기능들을 실행하기 위한 인스트럭션들의 세트일 수 있다. 전자 문서 라이브러리(250)는, PDF 솔루션으로 지칭될 수 있다.For example, a processor (210) executing a viewer application (260) may display a UI (e.g., the UI illustrated in FIG. 1) of the viewer application (260), including at least a portion of an electronic document represented by a file (280), on a display (110). The processor (210) may execute the viewer application (260) in response to an input for opening and/or browsing the file (280). The processor (210) executing the viewer application (260) may execute a rendering engine (251) included in an electronic document library (250) so that at least a portion of the electronic document (e.g., a portion corresponding to the shape and/or size of the display (110) and/or browser portion) is displayed. The electronic document library (250) may be a set of instructions for executing functions for processing a PDF-based file (280). The electronic document library (250) may be referred to as a PDF solution.
일 실시예에서, 렌더링 엔진(251)을 실행한 프로세서(210)는, 전자 문서의 렌더링 결과를 저장하기 위한 전자 문서 뷰(252)에, 전자 문서의 적어도 일부분을 표현한 이미지(예, 래스터 그래픽)를 저장할 수 있다. 렌더링 엔진(251)을 실행하여, 프로세서(210)는 파일(280)로부터, PDF에 기반하여 정의된 정보(예, 오브젝트들)를 획득할 수 있다. 획득된 정보를 이용하여 프로세서(210)는 전자 문서를 렌더링할 수 있다. In one embodiment, the processor (210) executing the rendering engine (251) may store an image (e.g., raster graphics) representing at least a portion of the electronic document in the electronic document view (252) for storing the rendering result of the electronic document. By executing the rendering engine (251), the processor (210) may obtain information (e.g., objects) defined based on PDF from the file (280). Using the obtained information, the processor (210) may render the electronic document.
일 실시예에서, 프로세서(210)는, 전자 문서 매니저(253)를 실행하여, 전자 문서의 생성, 표시 및/또는 저장을 제어(예, 렌더링 엔진(251) 및/또는 전자 문서 분석기(254)의 제어)할 수 있다. 예를 들어, 전자 문서 매니저(253)는, 전자 문서 라이브러리(250)의 기능들을 제공하기 위한 인터페이스로써, 전자 문서 라이브러리(250) 내에 포함될 수 있다. 전자 문서 매니저(253)를 실행하여, 프로세서(210)는 렌더링 엔진(251) 및/또는 전자 문서 분석기(254)의 실행을 제어할 수 있다. 예를 들어, 프로세서(210)는, 렌더링 엔진(251)으로부터 획득된 데이터를 이용하여, 전자 문서 분석기(254)를 실행할 수 있다. 전자 문서 매니저(253)를 실행하여, 프로세서(210)는 전자 문서 분석기(254)의 분석 결과를, 외부(예, 뷰어 어플리케이션(260))에 의해 사용가능한 (또는 판독가능한) 정보로 변환할 수 있거나, 또는 제공할 수 있다. 예를 들어, 프로세서(210)는 전자 문서 매니저(253)를 실행하여, 전자 문서의 적어도 일부분을, 메모리(220)(예, 휘발성 메모리) 내에 저장할 수 있다(캐싱). 전자 문서의 캐싱에 기반하여 프로세서(210)는, 전자 문서와 관련된 동작을 보다 신속하게 수행할 수 있다. In one embodiment, the processor (210) may execute an electronic document manager (253) to control the creation, display, and/or storage of electronic documents (e.g., control the rendering engine (251) and/or the electronic document analyzer (254)). For example, the electronic document manager (253) may be included in the electronic document library (250) as an interface for providing functions of the electronic document library (250). By executing the electronic document manager (253), the processor (210) may control the execution of the rendering engine (251) and/or the electronic document analyzer (254). For example, the processor (210) may execute the electronic document analyzer (254) using data obtained from the rendering engine (251). By executing the electronic document manager (253), the processor (210) can convert or provide the analysis results of the electronic document analyzer (254) into information usable (or readable) by an external device (e.g., a viewer application (260)). For example, the processor (210) can execute the electronic document manager (253) to store (cach) at least a portion of the electronic document in the memory (220) (e.g., volatile memory). Based on the caching of the electronic document, the processor (210) can perform operations related to the electronic document more quickly.
파일(280)에 의해 나타나는 전자 문서를 식별한 프로세서(210)는, 상기 전자 문서와 관련된 콘텐트를 생성하기 위한 기능(예, 요약 기능 및/또는 번역 기능)을 지원할 수 있다. 예를 들어, 프로세서(210)는, 뷰어 어플리케이션(260)의 요약 서비스(261)를 실행하여, 전자 문서의 콘텐트가 요약된 텍스트를 획득할 수 있다. 전자 문서를 요약하는 동작은, 상기 콘텐트를 설명하는, 적어도 하나의 자연어 문장을 생성하는 동작을 포함할 수 있다. 전자 문서를 요약하는 동작에 의해 생성된, 상기 적어도 하나의 자연어 문장은, 전자 문서의 콘텐트의 길이 및/또는 사이즈 보다 적은 길이 및/또는 사이즈를 가질 수 있다. 예를 들어, 프로세서(210)는 뷰어 어플리케이션(260)의 번역 서비스(262)를 실행하여, 전자 문서의 콘텐트의 적어도 일부분(예, 도 1의 제1 텍스트(131))에 대한 번역 기능을 실행할 수 있다. 프로세서(210)는, 뷰어 어플리케이션(260)에 기반하는 UI(예, 도 1의 디스플레이(110) 상에 표시된 UI)를 통하여, 번역 기능의 실행에 기반하여 번역될 텍스트의 범위를 식별할 수 있다. 프로세서(210)는, 상기 범위에 포함된, 전자 문서의 텍스트를 이용하여 번역 서비스(262)를 실행할 수 있다. The processor (210) that identifies the electronic document represented by the file (280) may support a function (e.g., a summary function and/or a translation function) for generating content related to the electronic document. For example, the processor (210) may execute a summary service (261) of the viewer application (260) to obtain a text in which the content of the electronic document is summarized. The operation of summarizing the electronic document may include an operation of generating at least one natural language sentence describing the content. The at least one natural language sentence generated by the operation of summarizing the electronic document may have a length and/or size less than the length and/or size of the content of the electronic document. For example, the processor (210) may execute a translation service (262) of the viewer application (260) to execute a translation function for at least a portion of the content of the electronic document (e.g., the first text (131) of FIG. 1). The processor (210) can identify the range of text to be translated based on the execution of the translation function through a UI (e.g., the UI displayed on the display (110) of FIG. 1) based on the viewer application (260). The processor (210) can execute a translation service (262) using the text of an electronic document included in the range.
요약 서비스(261) 및 번역 서비스(262)에 각각에 기반하는 요약 기능 및 번역 기능을 지원하기 위하여, 프로세서(210)는 인공지능 모델(270)을 실행할 수 있다. 인공지능 모델(270)은, 인간의 신경 활동(예, 추론 활동, 창작 활동, 인지 활동)을 모사하도록(simulating) 디자인된 계산 모델로서, 상기 계산 모델에 의해 나타나는 계산들을 수행하기 위한 프로그램, 하드웨어(예, NPU 및/또는 GPU), 또는 이들의 어느 조합(or any combination thereof)을 포함할 수 있다. 인공지능 모델(270)은, 프로세서(210) 및/또는 전자 장치(101)에 의해 단독으로 실행될 수 있다(예, 온-디바이스 및/또는 스탠드-얼론). 실시예가 이에 제한되는 것은 아니며, 전자 장치(101)는 인공지능 모델(270)을 실행하도록 구성된 외부 전자 장치(예, 서버)와 통신하여, 인공지능 모델(270)에 기반하는 기능(예, 요약 기능 및/또는 번역 기능)을 실행할 수 있다. 외부 전자 장치와 통신하기 위하여, 전자 장치(101)는 통신 회로(및/또는 모뎀)를 더 포함할 수 있다. In order to support the summary function and translation function based on the summary service (261) and the translation service (262), respectively, the processor (210) may execute an artificial intelligence model (270). The artificial intelligence model (270) is a computational model designed to simulate human neural activities (e.g., reasoning activities, creative activities, cognitive activities), and may include a program, hardware (e.g., NPU and/or GPU), or any combination thereof for performing calculations represented by the computational model. The artificial intelligence model (270) may be executed independently by the processor (210) and/or the electronic device (101) (e.g., on-device and/or stand-alone). The embodiment is not limited thereto, and the electronic device (101) may communicate with an external electronic device (e.g., a server) configured to execute the artificial intelligence model (270) to execute functions (e.g., summary functions and/or translation functions) based on the artificial intelligence model (270). To communicate with external electronic devices, the electronic device (101) may further include communication circuitry (and/or a modem).
예를 들어, 프로세서(210)는 사용자 입력에 기반하여, 인공지능 모델(270)(또는 번역 모델(272))에 기반하는 번역 기능을 실행할 수 있다. 예를 들어, 프로세서(210)는 다른 사용자 입력에 기반하여, 인공지능 모델(270)(또는 요약 모델(271))에 기반하는 요약 기능을 실행할 수 있다. 번역 기능을 실행할 시, 프로세서(210)는 번역 모델(272)로부터 획득된 번역 결과(예, 도 1의 제2 텍스트(150))를, 디스플레이(110) 상에 표시할 수 있다. 프로세서(210)가 상기 번역 결과를 디스플레이(110) 상에 표시하는 것은, 렌더링 엔진(251)의 실행에 기반하여, 수행될 수 있다. For example, the processor (210) may execute a translation function based on an artificial intelligence model (270) (or a translation model (272)) based on a user input. For example, the processor (210) may execute a summary function based on an artificial intelligence model (270) (or a summary model (271)) based on another user input. When executing the translation function, the processor (210) may display a translation result (e.g., the second text (150) of FIG. 1) obtained from the translation model (272) on the display (110). The processor (210) may display the translation result on the display (110) based on the execution of the rendering engine (251).
일 실시예에서, 프로세서(210)는, 태그와 같이, 텍스트의 스타일을 유지하도록 트레이닝된, 번역 모델(272)을 실행할 수 있다. 예를 들어, 텍스트의 스타일은, 너비, 및/또는 높이를 포함하는 폰트 사이즈, 폰트 네임, 자간, 라인 간격, 색상, 볼드, 언더라인, 아래첨자(subscript), 윗첨자(superscript), 및/또는 이탤릭 중 적어도 하나를 포함할 수 있다. 실시예가 이에 제한되는 것은 아니며, 텍스트의 스타일은, 텍스트가 위치될 수 있는 영역의 제한(예, 매트릭스, 테이블의 셀, 및/또는 텍스트 박스에 의해 제한되는 영역), 텍스트의 시인성, 및/또는 텍스트와 인접한 전자 문서의 콘텐트(예, 패스 및/또는 이미지)에 대한 정보를 포함할 수 있다. 프로세서(210)가 텍스트, 및 상기 텍스트의 적어도 일부분의 스타일을 나타내는 태그의 조합을 이용하여 번역 모델(272)을 실행하는 예시적인 동작이, 도 4를 참고하여 설명된다. 상기 텍스트, 및 상기 태그의 상기 조합은, 태그 변환기(255)를 실행하여 획득될 수 있다. In one embodiment, the processor (210) may execute a translation model (272) trained to maintain the style of text, such as tags. For example, the style of the text may include at least one of a font size, including width and/or height, a font name, kerning, line spacing, color, bold, underline, subscript, superscript, and/or italic. Embodiments are not limited thereto, and the style of the text may include information about the limitations of the area in which the text can be positioned (e.g., an area limited by a matrix, a cell of a table, and/or a text box), the visibility of the text, and/or the content of an electronic document adjacent to the text (e.g., paths and/or images). An exemplary operation of the processor (210) executing the translation model (272) using a combination of text and tags representing the style of at least a portion of the text is described with reference to FIG. 4. The above text and the above combination of tags can be obtained by executing a tag converter (255).
일 실시예에 따른, 프로세서(210)는, 태그 변환기(255)를 실행하여, 전자 문서에 포함된 텍스트로부터, 번역 모델(272)에 입력 가능한 정보를 생성할 수 있다. 상기 정보는, 상술한 바와 같이, 상기 텍스트의 (적어도 일부분의) 스타일을 나타내는 태그를 포함할 수 있다. 예를 들어, 텍스트의 제1 부분의 색상이, 텍스트의 나머지 부분의 색상과 다를 경우, 프로세서(210)는 태그 변환기(255)로부터, 상기 제1 부분의 색상을 나타내는 태그, 및 상기 텍스트의 조합을 획득할 수 있다. 상기 예시 내에서, 상기 텍스트의 제2 부분 만이 언더라인을 더 가지는 경우, 프로세서(210)는 태그 변환기(255)로부터, 상기 제1 부분의 색상을 나타내는 태그, 언더라인이 상기 제2 부분에 적용됨을 나타내는 다른 태그, 및 상기 텍스트의 조합을 획득할 수 있다. 프로세서(210)가 태그 변환기(255)를 실행하여 획득된 상기 조합의 예시가, 도 4를 참고하여 설명된다. In one embodiment, the processor (210) may execute a tag converter (255) to generate information inputtable into the translation model (272) from text included in an electronic document. The information may include tags indicating the style of (at least a portion of) the text, as described above. For example, if the color of a first portion of the text is different from the color of the rest of the text, the processor (210) may obtain, from the tag converter (255), a combination of a tag indicating the color of the first portion and the text. In the above example, if only a second portion of the text further has an underline, the processor (210) may obtain, from the tag converter (255), a combination of a tag indicating the color of the first portion, another tag indicating that an underline is applied to the second portion, and the text. An example of the combination obtained by the processor (210) executing the tag converter (255) is described with reference to FIG. 4.
일 실시예에서, 번역 모델(272)로부터 획득된 정보는, 제1 텍스트로부터 번역된 제2 텍스트, 및 상기 제2 텍스트의 적어도 일부분의 스타일을 나타내는 태그를 포함할 수 있다. 프로세서(210)는 태그 변환기(255)를 실행하여, 상기 제2 텍스트, 및 상기 태그의 조합에서, 렌더링 엔진(251)에 의해 판독가능한(또는 파싱가능한) 정보를 생성할 수 있거나, 또는 획득할 수 있다. 태그 변환기(255)를 실행하여 생성된, 상기 정보를 이용하여, 프로세서(210)는 디스플레이(110) 상에 상기 제2 텍스트를 포함하는 전자 문서를 표시할 수 있다. In one embodiment, the information obtained from the translation model (272) may include a second text translated from the first text, and tags indicating the style of at least a portion of the second text. The processor (210) may execute a tag converter (255) to generate or obtain information readable (or parsable) by the rendering engine (251) from a combination of the second text and the tags. Using the information generated by executing the tag converter (255), the processor (210) may display an electronic document including the second text on the display (110).
일 실시예에 따른, 프로세서(210)는 뷰어 어플리케이션(260)을 실행하여, 번역 결과를 포함하는 전자 문서를 나타내는 파일(280)을 생성할 수 있거나, 또는 저장할 수 있다. 파일(280) 내에, 도 1을 참고하여 상술한 바와 같이, 번역 기능이 전자 문서로 적용되었음을 나타내는 워터마크가, 상기 번역 결과와 함께 저장될 수 있다. 프로세서(210)는, 뷰어 어플리케이션(260)을 이용하여, 디스플레이(110) 상에 상기 번역 결과를 표시할 수 있다. According to one embodiment, the processor (210) may execute a viewer application (260) to generate or store a file (280) representing an electronic document including the translation result. Within the file (280), a watermark indicating that a translation function has been applied to the electronic document, as described above with reference to FIG. 1, may be stored together with the translation result. The processor (210) may display the translation result on the display (110) using the viewer application (260).
일 실시예에 따른, 프로세서(210)는, 전자 문서 매니저(253)를 실행하여, 번역 기능과 관련된 동작을 수행할 수 있다. 예를 들어, 뷰어 어플리케이션(260)의 UI를 통하여 번역을 위한 입력을 수신할 시, 프로세서(210)는, 렌더링 엔진(251)을 통하여, 상기 입력에 의해 번역될 텍스트(예, 도 1의 제1 텍스트(131))를 획득할 수 있다. 프로세서(210)는, 전자 문서 분석기(254)를 실행하여, 획득된 텍스트로부터 번역 기능을 실행하기 위하여 이용될 정보(예, 번역 모델(272)로 입력될 정보)를 획득할 수 있거나, 또는 생성할 수 있다. 상기 정보를 이용하여 번역 기능을 실행하여, 전자 문서의 제1 텍스트로부터 번역된 제2 텍스트를 획득한 프로세서(210)는, 렌더링 엔진(251)을 실행하여, 상기 제2 텍스트를 포함하는 전자 문서를 표시할 수 있다. 프로세서(210)는 전자 문서 분석기(254)를 실행하여, 상기 제2 텍스트를 표시하기 위하여 전자 문서의 콘텐트의 배열을 조절(예, 재배치)할지 여부를 결정할 수 있다. 전자 문서의 콘텐트의 배열을 조절하기로 결정한 경우, 프로세서(210)는 상기 배열을 조절하기 위한 요청과 함께, 렌더링 엔진(251)을 실행할 수 있다. According to one embodiment, the processor (210) may execute the electronic document manager (253) to perform operations related to the translation function. For example, when receiving an input for translation through the UI of the viewer application (260), the processor (210) may obtain text to be translated by the input (e.g., the first text (131) of FIG. 1) through the rendering engine (251). The processor (210) may execute the electronic document analyzer (254) to obtain or generate information to be used for executing the translation function from the obtained text (e.g., information to be input to the translation model (272)). The processor (210), which executes the translation function using the information and obtains a second text translated from the first text of the electronic document, may execute the rendering engine (251) to display the electronic document including the second text. The processor (210) may execute an electronic document analyzer (254) to determine whether to adjust (e.g., rearrange) the arrangement of the content of the electronic document to display the second text. If it is determined to adjust the arrangement of the content of the electronic document, the processor (210) may execute a rendering engine (251) along with a request to adjust the arrangement.
일 실시예에 따른, 프로세서(210)는 전자 문서 분석기(254)를 실행하여, 전자 문서에 대한 분석 기능을 실행할 수 있다. 상기 분석 기능은, 전자 문서에 포함된 텍스트들을 그룹핑하여, 문단 및/또는 단락과 같은 텍스트들의 그룹을 생성하는 기능을 포함할 수 있다. 상기 분석 기능은, 번역 기능을 실행한 결과(이하, 번역 결과)가 전자 문서의 다른 콘텐트와 중첩되는지 여부를 체크하는 기능을 포함할 수 있다. 상기 분석 기능은, 번역 결과가 다른 콘텐트와 중첩되지 않도록, 번역 결과의 속성(예, 번역 결과에 포함된 텍스트의 스타일, 및/또는 번역 결과가 표시될 전자 문서의 영역의 치수들(dimensions)(예, 너비, 및/또는 높이))을 조절하는 동작을 포함할 수 있다. According to one embodiment, the processor (210) may execute an electronic document analyzer (254) to execute an analysis function for the electronic document. The analysis function may include a function of grouping texts included in the electronic document to create groups of texts, such as paragraphs and/or paragraphs. The analysis function may include a function of checking whether a result of executing a translation function (hereinafter, referred to as a translation result) overlaps with other content of the electronic document. The analysis function may include an operation of adjusting properties of the translation result (e.g., a style of text included in the translation result, and/or dimensions (e.g., width and/or height) of an area of the electronic document where the translation result is to be displayed) so that the translation result does not overlap with other content.
상술한 바와 같이, 프로세서(210)는 렌더링 엔진(251)을 실행하여, 디스플레이(110) 상에 전자 문서를 시각화하기 위한 동작을 수행할 수 있다. 프로세서(210)는 렌더링 엔진(251)을 실행하여, 전자 문서에 포함된 복수의 오브젝트들(예, PDF(portable document format)에 의해 정의된, 전자 문서의 콘텐트를 나타내는 정보의 세트)에 대응하는 이미지들을 생성할 수 있다. 상기 이미지들은, 전자 문서의 콘텐트의 배열에 따라, 디스플레이(110) 상에서 배치될 수 있거나, 또는 오버레이될 수 있다. 예를 들어, 프로세서(210)는 메모리(220) 상에, 디스플레이(110) 상에 표시될 전자 문서의 이미지가 저장될 버퍼를 포함하는, 전자 문서 뷰(252)를 생성할 수 있다. 전자 문서 뷰(252)를 실행한 프로세서(210)는, 렌더링 엔진(251)에 의해 렌더링된 전자 문서의 적어도 일부분을, 디스플레이(110) 상에 표시하기 위한 정보를 저장할 수 있다. As described above, the processor (210) may execute the rendering engine (251) to perform an operation for visualizing an electronic document on the display (110). The processor (210) may execute the rendering engine (251) to generate images corresponding to a plurality of objects included in the electronic document (e.g., a set of information representing the content of the electronic document, defined by a portable document format (PDF)). The images may be arranged on the display (110) or may be overlaid, depending on the arrangement of the content of the electronic document. For example, the processor (210) may generate an electronic document view (252) including a buffer in the memory (220) in which an image of the electronic document to be displayed on the display (110) is stored. The processor (210) that executes the electronic document view (252) may store information for displaying at least a portion of the electronic document rendered by the rendering engine (251) on the display (110).
이하에서는, 도 3을 참고하여, 뷰어 어플리케이션(260)을 실행하여, 파일(280)을 생성하는 전자 장치(101) 및/또는 프로세서(210)의 동작이 설명된다. Hereinafter, with reference to FIG. 3, the operation of an electronic device (101) and/or a processor (210) that executes a viewer application (260) to create a file (280) is described.
도 3은, 번역 기능을 실행하여 획득된 텍스트(예, 도 1의 제2 텍스트(151))가 표시될 전자 문서(예, 도 1의 전자 문서(130))의 영역을 결정하는 전자 장치의 동작에 대한 흐름도를 도시한다. 도 1 내지 도 2의 전자 장치(101)는, 도 3을 참고하여 설명되는 동작을 수행할 수 있다. 예를 들어, 도 3의 동작들 중 적어도 하나는, 도 2의 전자 장치(101) 및/또는 프로세서(210)에 의해 수행될 수 있다. 도 3에 도시된 동작들의 순서는, 예시적인 것으로, 실시예가 이에 제한되는 것은 아니다. 예를 들어, 전자 장치는 도 3의 동작들을, 도 3에 도시된 동작들과 다른 순서로 수행할 수 있다. 예를 들어, 전자 장치는 도 3의 동작들 중 적어도 두 동작들을 실질적으로 동시에 수행할 수 있다. FIG. 3 is a flowchart illustrating an operation of an electronic device for determining an area of an electronic document (e.g., an electronic document (130) of FIG. 1) in which text obtained by executing a translation function (e.g., a second text (151) of FIG. 1) is to be displayed. The electronic device (101) of FIGS. 1 and 2 may perform the operations described with reference to FIG. 3. For example, at least one of the operations of FIG. 3 may be performed by the electronic device (101) and/or the processor (210) of FIG. 2. The order of the operations illustrated in FIG. 3 is exemplary, and the embodiment is not limited thereto. For example, the electronic device may perform the operations of FIG. 3 in a different order from the operations illustrated in FIG. 3. For example, the electronic device may perform at least two of the operations of FIG. 3 substantially simultaneously.
도 3을 참고하면, 동작(310) 내에서, 일 실시예에 따른, 전자 장치는, 전자 문서의 제1 영역에 위치된 제1 텍스트(예, 도 1의 제1 텍스트(131))의 번역을 위한 입력을 수신할 수 있다. 전자 장치는, 제1 텍스트를 포함하는 전자 문서(예, 도 2의 파일(280)을 파싱하여 식별된, 전자 문서)를 표시하는 동안, 동작(310)의 입력을 수신할 수 있다. 실시예가 이에 제한되는 것은 아니며, 전자 장치는, 전자 문서를 표시하기 이전에(예, 전자 문서를 포함하는 파일을 표현하는 아이콘을 표시하는 동안), 동작(310)의 입력을 수신할 수 있다. Referring to FIG. 3, in operation (310), according to one embodiment, an electronic device may receive an input for translating a first text located in a first area of an electronic document (e.g., first text (131) of FIG. 1). The electronic device may receive the input of operation (310) while displaying an electronic document including the first text (e.g., an electronic document identified by parsing a file (280) of FIG. 2). The embodiment is not limited thereto, and the electronic device may receive the input of operation (310) before displaying the electronic document (e.g., while displaying an icon representing a file including the electronic document).
도 3을 참고하면, 동작(320) 내에서, 일 실시예에 따른, 전자 장치는, 제1 텍스트의 속성을 나타내는 태그 정보를 획득할 수 있다. 전자 장치는, 도 2의 렌더링 엔진(251)을 실행하여, 동작(320)의 태그 정보를 획득할 수 있다. 전자 장치는, 동작(310)의 입력을 수신하는 것에 기반하여, 동작(320)을 수행할 수 있다. 동작(320) 내에서, 전자 장치는 도 2의 태그 변환기(255)를 실행하여, 동작(320)의 태그 정보를 획득할 수 있다. 태그 정보는, 제1 텍스트의 적어도 일부분의 스타일을 나타내는 문자들을 포함할 수 있다. 예를 들어, 태그 정보는 XML(extended marked-up language)과 같은 마크-업 언어에 기반하는 포맷을 가질 수 있다. 실시예가 이에 제한되는 것은 아니며, CSS(cascaded style sheets)와 같이, 텍스트의 스타일을 나타내도록 정의된, 다른 포맷을 가질 수 있다. Referring to FIG. 3, in operation (320), according to an embodiment, an electronic device may obtain tag information indicating properties of a first text. The electronic device may obtain tag information of operation (320) by executing the rendering engine (251) of FIG. 2. The electronic device may perform operation (320) based on receiving an input of operation (310). In operation (320), the electronic device may obtain tag information of operation (320) by executing the tag converter (255) of FIG. 2. The tag information may include characters indicating the style of at least a portion of the first text. For example, the tag information may have a format based on a mark-up language such as extended marked-up language (XML). The embodiment is not limited thereto, and may have another format defined to indicate the style of text, such as cascaded style sheets (CSS).
도 3을 참고하면, 동작(330) 내에서, 일 실시예에 따른, 전자 장치는, 제1 텍스트에 대한 번역 기능을 실행할 수 있다. 전자 장치는, 도 2의 번역 서비스(262) 및/또는 번역 모델(272)을 실행하여, 동작(330)이 번역 기능을 실행할 수 있다. 동작(330)의 번역 기능은, 전자 장치의 프로세서(예, 도 2의 프로세서(210))에 의해 실행되도록 설계된 온-디바이스 모델에 의해 수행될 수 있다. 실시예가 이에 제한되는 것은 아니며, 전자 장치는 인공지능 모델을 포함하는 외부 전자 장치로, 제1 텍스트의 번역을 요청할 수 있다. 상기 요청은, 제1 텍스트, 및 동작(320)의 태그 정보를 포함할 수 있다. 상기 요청을 수신한 외부 전자 장치로부터, 전자 장치는, 제1 텍스트에 대한 번역 결과를 수신할 수 있다. Referring to FIG. 3, in operation (330), according to an embodiment, an electronic device may execute a translation function for a first text. The electronic device may execute the translation service (262) and/or the translation model (272) of FIG. 2 to execute the translation function of operation (330). The translation function of operation (330) may be performed by an on-device model designed to be executed by a processor of the electronic device (e.g., the processor (210) of FIG. 2). The embodiment is not limited thereto, and the electronic device may request a translation of the first text from an external electronic device including an artificial intelligence model. The request may include the first text and tag information of operation (320). From the external electronic device that received the request, the electronic device may receive a translation result for the first text.
일 실시예에서, 동작들(320, 330)이 수행되는 순서는, 도 3에 도시된 순서에 제한되지 않는다. 예를 들어, 전자 장치는 동작(330)을 수행한 다음, 동작(320)을 수행할 수 있다. 예를 들어, 전자 장치는, 멀티-스레드와 같은, 멀티-태스킹에 기반하여, 동작들(320, 330)을 실질적으로 동시에 수행할 수 있다. In one embodiment, the order in which operations (320, 330) are performed is not limited to the order illustrated in FIG. 3. For example, the electronic device may perform operation (330) and then operation (320). For example, the electronic device may perform operations (320, 330) substantially simultaneously based on multi-tasking, such as multi-threading.
도 3을 참고하면, 동작(335) 내에서, 일 실시예에 따른, 전자 장치는, 제1 텍스트에 기반하는 제1 영역의 사이즈를 식별할 수 있다. 전자 장치는, 동작(320)의 태그 정보(또는 제1 텍스트의 속성)를 이용하여, 전자 문서 내에서 제1 텍스트에 의해 점유되는, 제1 영역의 사이즈를 식별할 수 있거나, 또는 계산할 수 있다. 상기 제1 영역은, 동작(310)의 제1 영역에 대응할 수 있다. 동작(335)에 기반하여 식별되는, 제1 영역의 사이즈는, 제1 영역의 높이, 너비, 및/또는 제1 영역의 형태를 포함할 수 있다. Referring to FIG. 3, in operation (335), according to one embodiment, an electronic device may identify a size of a first region based on a first text. The electronic device may identify or calculate a size of a first region occupied by the first text within an electronic document using tag information (or attributes of the first text) of operation (320). The first region may correspond to the first region of operation (310). The size of the first region identified based on operation (335) may include a height, a width, and/or a shape of the first region.
도 3을 참고하면, 동작(340) 내에서, 일 실시예에 따른, 전자 장치는, 제1 텍스트로부터 번역된 제2 텍스트, 및 태그 정보를 이용하여, 제2 텍스트를 표시하기 위한 제2 영역의 사이즈를 식별할 수 있다. 번역 기능을 실행하여 획득된 결과는, 상기 제2 텍스트, 및 상기 제2 텍스트의 적어도 일부분의 스타일을 나타내는 태그 정보를 포함할 수 있다. 상기 태그 정보는, 동작(320)의 태그 정보에 대응할 수 있다. 예를 들어, 제1 텍스트의 제1 부분에 대응하는 태그 정보가 동작(320)에 기반하여 획득된 경우, 동작(340)의 제2 텍스트의 태그 정보는, 상기 제1 부분에 대응하는 제2 텍스트의 제2 부분의 스타일이, 상기 제1 부분의 스타일과 같음을 나타낼 수 있다. Referring to FIG. 3, in operation (340), according to an embodiment, an electronic device may identify a size of a second area for displaying a second text using a second text translated from a first text and tag information. A result obtained by executing a translation function may include the second text and tag information indicating a style of at least a portion of the second text. The tag information may correspond to the tag information of operation (320). For example, if tag information corresponding to a first portion of the first text is obtained based on operation (320), the tag information of the second text of operation (340) may indicate that the style of the second portion of the second text corresponding to the first portion is the same as the style of the first portion.
동작(340)을 수행하는 전자 장치는, 동작(320)의 태그 정보에 의해 나타나는, 제2 텍스트의 스타일에 기반하여, 제2 텍스트를 표시하기 위한 제2 영역의 사이즈를 식별할 수 있다. 전자 장치는, 제1 텍스트를 표시하기 위한 제1 영역이 위치된, 전자 문서의 적어도 일부분 내에서, 동작(340)의 제2 영역을 식별할 수 있다. 예를 들어, 제2 영역은, 제1 텍스트가 표시되었던 사각형의 제1 영역 내에서 식별될 수 있거나, 상기 제1 영역 및 상기 제1 영역에 인접한 공백 영역 내에서 식별될 수 있다. 제1 텍스트가 표와 같은 그리드, 및/또는 라인에 인접한 경우, 전자 장치는 상기 그리드 및/또는 상기 라인에 기반하여(예, 상기 그리드 내에서, 및/또는 상기 라인과 중첩되지 않는 전자 문서의 부분 내에서), 동작(340)의 제2 영역을 식별할 수 있다. 예를 들어, 제2 영역의 사이즈는, 제1 텍스트가 위치된 전자 문서의 일부분(예, 단락 및/또는 (가상) 페이지)의 사이즈에 기반하여 결정될 수 있다. 예를 들어, 전자 장치는 상기 제2 영역의 너비, 높이, 및/또는 넓이를 계산할 수 있거나, 또는 식별할 수 있다. 예를 들어, 전자 장치는, 제1 텍스트의 폰트 사이즈, 및/또는 라인 간격을 이용하여, 제2 텍스트를 표시하기 위한, 전자 문서 내 제2 영역의 사이즈를 식별할 수 있거나, 또는 계산할 수 있다. 동작(340)의 사이즈를 식별하는 것에 기반하여, 전자 장치는 동작(350)을 수행할 수 있다. An electronic device performing operation (340) may identify a size of a second area for displaying the second text based on the style of the second text indicated by the tag information of operation (320). The electronic device may identify the second area of operation (340) within at least a portion of the electronic document in which the first area for displaying the first text is located. For example, the second area may be identified within the first area of the rectangle in which the first text was displayed, or may be identified within the first area and a blank area adjacent to the first area. If the first text is adjacent to a grid such as a table and/or lines, the electronic device may identify the second area of operation (340) based on the grid and/or lines (e.g., within the grid and/or within a portion of the electronic document that does not overlap with the lines). For example, the size of the second area may be determined based on a size of a portion of the electronic document in which the first text is located (e.g., a paragraph and/or a (virtual) page). For example, the electronic device may calculate or identify the width, height, and/or area of the second region. For example, the electronic device may identify or calculate the size of the second region within the electronic document for displaying the second text using the font size and/or line spacing of the first text. Based on identifying the size of operation (340), the electronic device may perform operation (350).
도 3을 참고하면, 동작(350) 내에서, 일 실시예에 따른, 전자 장치는, 제1 텍스트가 위치된, 전자 문서의 제1 영역의 사이즈 보다, 동작(340)에 기반하여 식별된, 제2 영역의 사이즈가 더 크거나 또는 같은지 여부를 판단할 수 있거나, 또는 결정할 수 있다. 동작(340)의 제2 영역의 사이즈가, 제1 텍스트가 위치된 상기 제1 영역 보다 크거나(또는 넓은), 또는 같은 경우(350-예), 전자 장치는 동작(360)을 수행할 수 있다. 동작(340)의 제2 영역의 사이즈가, 제1 텍스트가 위치된 상기 제1 영역 보다 작은(또는 좁은) 경우(350-아니오), 전자 장치는 동작(370)을 수행할 수 있다. 동작들(360, 370)을 참고하여 후술하는 바와 같이, 전자 장치는 동작(350)을 수행하여, 번역 결과인 제2 텍스트 전체가, 상기 제2 텍스트의 원본 텍스트인, 제1 텍스트가 표시된 전자 문서 내 제1 영역에 포함되는 지 여부를 확인할 수 있거나, 또는 체크할 수 있다. Referring to FIG. 3, in operation (350), according to one embodiment, the electronic device may determine or determine whether the size of the second area identified based on operation (340) is larger than or equal to the size of the first area of the electronic document where the first text is located. If the size of the second area of operation (340) is larger than (or wider than) or equal to (350—Yes), the electronic device may perform operation (360). If the size of the second area of operation (340) is smaller than (or narrower than) the first area where the first text is located (350—No), the electronic device may perform operation (370). As will be described later with reference to operations (360, 370), the electronic device can perform operation (350) to determine or check whether the entire second text, which is the result of the translation, is included in the first area within the electronic document where the first text, which is the original text of the second text, is displayed.
도 3을 참고하면, 동작(360) 내에서, 일 실시예에 따른, 전자 장치는, 제2 텍스트가 표시될 전자 문서의 영역을 결정하기 위한 배치 알고리즘을 수행할 수 있다. 예를 들어, 상기 배치 알고리즘은, 제2 텍스트가 표시될 전자 문서의 영역이, 제1 텍스트가 위치된 전자 문서의 제1 영역, 및 상기 제1 영역에 인접한 공백 영역에 포함되도록, 수행될 수 있다. 예를 들어, 상기 배치 알고리즘은, 제2 텍스트가 표시될 전자 문서의 영역이, 제1 텍스트와 인접한 전자 문서의 다른 콘텐트에 의해 제한되도록(bounded by) 수행될 수 있다. 예를 들어, 상기 배치 알고리즘은, 제2 텍스트가 표시될 전자 문서의 영역을, 제1 텍스트가 위치된 전자 문서의 제1 영역의 사이즈 이하로 줄이기 위하여, 수행될 수 있다. Referring to FIG. 3, in operation (360), according to one embodiment, an electronic device may perform a layout algorithm to determine an area of an electronic document where a second text is to be displayed. For example, the layout algorithm may be performed such that the area of the electronic document where the second text is to be displayed is included in a first area of the electronic document where the first text is located and a blank area adjacent to the first area. For example, the layout algorithm may be performed such that the area of the electronic document where the second text is to be displayed is bounded by other content of the electronic document adjacent to the first text. For example, the layout algorithm may be performed such that the area of the electronic document where the second text is to be displayed is reduced to a size equal to or smaller than the size of the first area of the electronic document where the first text is located.
일 실시예에서, 배치 알고리즘은 하나 이상의 방식들을 포함할 수 있다. 본 개시에서, 제1 방식은, 제1 텍스트가 위치된 전자 문서의 제1 영역, 및 상기 제1 영역에 인접한 공백 영역 내에서, 제2 텍스트가 표시될 전자 문서의 영역을 결정하는 방식을 지칭할(referred) 수 있다. 제1 방식이, 도 6, 도 7a 및/또는 도 7b를 참고하여 설명된다. 본 개시에서, 제2 방식은, 제2 텍스트의 스타일(예, 폰트 사이즈 및/또는 라인 간격)을 조절하여, 제2 텍스트가 표시될 전자 문서의 영역을 줄이는 방식을 지칭할 수 있다. 제2 방식이, 도 8, 도 9, 및/또는 도 10을 참고하여 설명된다. 본 개시에서, 제3 방식은, 전자 문서 내에서 제2 텍스트에 인접한 다른 콘텐트를 이동하는 방식을 지칭할 수 있다. 제3 방식이, 도 11 내지 도 12를 참고하여 설명된다. In one embodiment, the placement algorithm may include one or more methods. In the present disclosure, a first method may refer to a method of determining an area of an electronic document where a second text is to be displayed, within a first area of an electronic document where a first text is located and a blank area adjacent to the first area. The first method is described with reference to FIGS. 6, 7A, and/or 7B. In the present disclosure, a second method may refer to a method of reducing an area of an electronic document where the second text is to be displayed by adjusting the style of the second text (e.g., font size and/or line spacing). The second method is described with reference to FIGS. 8, 9, and/or 10. In the present disclosure, a third method may refer to a method of moving other content adjacent to the second text within the electronic document. The third method is described with reference to FIGS. 11 and 12.
전자 장치는, 제1 방식 내지 제3 방식 중 적어도 하나를 선택적으로 수행할 수 있다. 전자 장치는, 제1 방식 내지 제3 방식 중 적어도 두 방식들을 순차적으로 수행할 수 있다. 전자 장치는, 제1 방식 내지 제3 방식 전부를 순차적으로 수행할 수 있다. 제1 방식 내지 제3 방식들 중 적어도 하나 두 방식들이 수행되는 순서는, 본 개시의 예시들에 제한되지 않는다. 예시적인 순서에 따라 제1 방식 내지 제3 방식을 수행하는 전자 장치의 동작이, 도 5를 참고하여 설명된다. 동작(360)의 배치 알고리즘을 수행하여, 전자 장치는, 제2 텍스트가 표시될 전자 문서의 영역이, 전자 문서의 다른 콘텐트와 중첩되지 않도록, 제2 텍스트가 표시될 전자 문서의 상기 영역을 결정할 수 있거나, 또는 설정할 수 있다. The electronic device can selectively perform at least one of the first to third methods. The electronic device can sequentially perform at least two of the first to third methods. The electronic device can sequentially perform all of the first to third methods. The order in which at least one or two of the first to third methods are performed is not limited to the examples of the present disclosure. The operation of the electronic device performing the first to third methods according to the exemplary order is described with reference to FIG. 5. By performing the arrangement algorithm of operation (360), the electronic device can determine or set the area of the electronic document where the second text is to be displayed so that the area of the electronic document where the second text is to be displayed does not overlap with other content of the electronic document.
도 3을 참고하면, 동작(370) 내에서, 일 실시예에 따른, 전자 장치는, 전자 문서에 제2 텍스트와 관련된 오브젝트를 삽입할 수 있다. 동작(370)의 오브젝트는, PDF에서 정의된, 전자 문서의 콘텐트의 적어도 일부분을 나타내는 정보의 세트를 지칭할 수 있다. 이진 코드로 인코딩된 PDF 파일 내에서, 오브젝트는, 바디 영역 내에서 지정된 예약어들의 페어(예, "obj" 및 "endobj")에 의해 정의될 수 있다. 복수의 오브젝트들은, 텍스트, 이미지, 패스, 표, 폼(form), 패스, 및/또는 쉐이딩 객체를 포함하는, 전자 문서 내 다양한 콘텐트들 각각에 대하여 정의될 수 있거나, 또는 규격화될 수 있다. 오브젝트는 문서 오브젝트 및/또는 문서 요소(element)로 지칭될 수 있다. Referring to FIG. 3, in operation (370), according to one embodiment, an electronic device may insert an object related to a second text into an electronic document. An object of operation (370) may refer to a set of information representing at least a portion of the content of an electronic document, as defined in a PDF. Within a binary-encoded PDF file, an object may be defined by a pair of reserved words (e.g., “obj” and “endobj”) specified within a body area. Multiple objects may be defined or standardized for each of various contents within the electronic document, including text, images, paths, tables, forms, paths, and/or shading objects. An object may be referred to as a document object and/or a document element.
PDF에 기반하는 파일(예, 도 2의 파일(280))에 포함된 전자 문서를 시각화할 시, 전자 장치는, 상기 파일로부터 복수의 오브젝트들을 식별할 수 있거나, 또는 인식할 수 있다(예, 파싱). 식별된 복수의 오브젝트들은, 상기 전자 문서의 콘텐트의 상이한 부분들에 각각 대응할 수 있다. 전자 장치는, 디스플레이(예, 도 2의 디스플레이(110)) 상에 상기 전자 문서를 렌더링할 시, 메모리(예, 휘발성 메모리와 같은, 도 2의 메모리(220))상기 전자 문서의 시각화를 위한 정보(예, 상기 복수의 오브젝트들)를 저장할 수 있다. 동작(370)을 수행하여, 전자 장치는, 메모리에 저장된 상기 정보에, 제2 텍스트를 나타내는 오브젝트를 삽입할 수 있다. 도 6을 참고하면, 전자 장치가 동작(360)에 기반하는 배치 알고리즘을 수행한 경우, 동작(370)에 기반하여 삽입되는 오브젝트는, 동작(360)의 배치 알고리즘에 따른 형태, 사이즈, 및/또는 위치를 가지는 제2 텍스트를 나타낼 수 있다. When visualizing an electronic document contained in a PDF-based file (e.g., file (280) of FIG. 2), an electronic device may identify or recognize (e.g., parse) a plurality of objects from the file. The identified plurality of objects may each correspond to different portions of the content of the electronic document. When rendering the electronic document on a display (e.g., display (110) of FIG. 2), the electronic device may store information for visualizing the electronic document (e.g., the plurality of objects) in a memory (e.g., memory (220) of FIG. 2, such as a volatile memory). By performing operation (370), the electronic device may insert an object representing a second text into the information stored in the memory. Referring to FIG. 6, when the electronic device performs a placement algorithm based on operation (360), the object inserted based on operation (370) may represent a second text having a shape, size, and/or position according to the placement algorithm of operation (360).
도 6의 동작들(350, 360, 370)을 참고하면, 제1 영역의 사이즈 보다, 제2 텍스트를 표시하기 위한 영역의 사이즈가 더 큰 경우, 전자 장치는 배치 알고리즘을 수행하여, 제2 텍스트에 대응하는 오브젝트를 결정할 수 있다. 상기 배치 알고리즘에 기반하여, 전자 장치는, 제2 텍스트를 포함하는 영역의 사이즈, 및/또는 위치를 결정할 수 있거나, 또는 제2 텍스트와 인접한 전자 문서 내 다른 콘텐트의 사이즈, 및/또는 위치를 변경할 수 있다. Referring to operations (350, 360, 370) of FIG. 6, if the size of the area for displaying the second text is larger than the size of the first area, the electronic device may perform a placement algorithm to determine an object corresponding to the second text. Based on the placement algorithm, the electronic device may determine the size and/or position of the area including the second text, or change the size and/or position of other content within the electronic document adjacent to the second text.
도 6의 동작들(350, 360, 370)을 참고하면, 제1 영역의 사이즈 보다, 제2 텍스트를 표시하기 위한 영역의 사이즈가 더 작은 경우, 전자 장치는 배치 알고리즘을 수행하지 않을 수 있다. 예를 들어, 전자 장치는 동작(350)의 제1 영역에, 제2 텍스트를 표시할 수 있다. 제1 영역의 사이즈 보다, 제2 텍스트를 표시하기 위한 영역의 사이즈가 더 작기 때문에, 제2 텍스트 전체가, 제1 영역 내에 포함될 수 있다. 상기 예시 내에서, 제1 텍스트가 전자 문서의 다른 콘텐트와 중첩되지 않는 한, 제2 텍스트는, 전자 문서의 다른 콘텐트와 중첩되지 않는다. 전자 장치는, 제1 영역의 시작 위치로부터 시작되고, 동작(340)에 기반하여 식별된 사이즈를 가지는 영역을, 제2 텍스트가 위치될(또는 표시될) 영역으로 결정할 수 있다. Referring to operations (350, 360, 370) of FIG. 6, if the size of the area for displaying the second text is smaller than the size of the first area, the electronic device may not perform the placement algorithm. For example, the electronic device may display the second text in the first area of operation (350). Since the size of the area for displaying the second text is smaller than the size of the first area, the entire second text may be included in the first area. In the above example, as long as the first text does not overlap with other content of the electronic document, the second text does not overlap with other content of the electronic document. The electronic device may determine an area starting from the start position of the first area and having a size identified based on operation (340) as the area where the second text will be positioned (or displayed).
도 3을 참고하면, 동작(380) 내에서, 일 실시예에 따른, 전자 장치는, 전자 문서 내의 제1 텍스트 및/또는 제2 텍스트의 태그 정보를 결정할 수 있거나, 또는 변경할 수 있다. 예를 들어, 전자 장치는, 제1 텍스트에 대응하는 태그 정보에, 전자 문서의 원본(또는 원문)임을 나타내는 제1 지정된 값(예, 제1 플래그 값)을 추가할 수 있다. 예를 들어, 전자 장치는, 제2 텍스트에 대응하는 태그 정보에, 전자 문서의 번역문임을 나타내는 제2 지정된 값(예, 제2 플래그 값)을 추가할 수 있다. Referring to FIG. 3, in operation (380), according to one embodiment, an electronic device may determine or modify tag information of a first text and/or a second text within an electronic document. For example, the electronic device may add a first designated value (e.g., a first flag value) to tag information corresponding to the first text, indicating that the text is an original (or original text) of the electronic document. For example, the electronic device may add a second designated value (e.g., a second flag value) to tag information corresponding to the second text, indicating that the text is a translation of the electronic document.
예를 들어, 전자 장치는, 디스플레이를 통해 제1 텍스트를 표시하는 것이 중단되도록(예, 숨김), 제1 텍스트에 대응하는 태그 정보를 설정할 수 있거나, 또는 변경할 수 있다. 예를 들어, 전자 문서를 표시하기 위하여 메모리에 형성된 버퍼 내에서, 전자 문서의 오브젝트들이 저장된 경우, 전자 장치는 제1 텍스트에 대응하는 오브젝트를, 메모리로부터 제거할 수 있다. 예를 들어, 전자 장치는, 제1 텍스트에 대응하는 오브젝트를, 상기 버퍼로부터, 다른 영역으로 이동할 수 있다. 예를 들어, 전자 장치는, 제1 텍스트에, 시인성을 감소하거나, 또는 제거하기 위한 플래그 값 및/또는 속성을 할당(assign)할 수 있다. 예를 들어, 전자 장치는, 제1 텍스트에 대응하는 오브젝트로, 상기 플래그 값 및/또는 상기 속성을 추가할 수 있거나, 또는 할당할 수 있다. For example, the electronic device may set or change tag information corresponding to the first text to stop (e.g., hide) displaying the first text through the display. For example, if objects of an electronic document are stored in a buffer formed in memory for displaying the electronic document, the electronic device may remove the object corresponding to the first text from the memory. For example, the electronic device may move the object corresponding to the first text from the buffer to another area. For example, the electronic device may assign a flag value and/or an attribute to the first text to reduce or eliminate visibility. For example, the electronic device may add or assign the flag value and/or the attribute to an object corresponding to the first text.
일 실시예에서, 동작들(370, 380)이 수행되는 순서는, 도 3에 도시된 순서에 제한되지 않는다. 예를 들어, 전자 장치는 동작들(370, 380)을, 도 3에 도시된 순서와 다르게(예, 반대 순서) 수행할 수 있다. 예를 들어, 전자 장치는 동작들(370, 380)을 실질적으로 동시에 수행할 수 있다(예, 멀티-태스킹). In one embodiment, the order in which the operations (370, 380) are performed is not limited to the order illustrated in FIG. 3. For example, the electronic device may perform the operations (370, 380) in a different order (e.g., in the opposite order) than the order illustrated in FIG. 3. For example, the electronic device may perform the operations (370, 380) substantially simultaneously (e.g., multi-tasking).
도 3을 참고하면, 동작(390) 내에서, 일 실시예에 따른, 전자 장치는, 제2 텍스트를 포함하는 전자 문서의 적어도 일부분을 표시할 수 있다. 전자 장치가 동작(380)에 기반하여 제1 텍스트를 숨기기 때문에, 동작(390)에서 표시되는, 전자 문서의 적어도 일부분은, 제1 텍스트를 포함하지 않을 수 있다. 예를 들어, 제2 텍스트가, 제1 텍스트가 위치된 상기 제1 영역에 표시된 경우, 전자 장치는 동작(390)을 수행하여, 상기 제1 텍스트가 제2 텍스트로 교체된 것과 같은 사용자 경험을 제공할 수 있다. Referring to FIG. 3 , in operation (390), according to one embodiment, an electronic device may display at least a portion of an electronic document including a second text. Since the electronic device hides the first text based on operation (380), at least a portion of the electronic document displayed in operation (390) may not include the first text. For example, if the second text is displayed in the first area where the first text is located, the electronic device may perform operation (390) to provide a user experience as if the first text has been replaced with the second text.
상술한 바와 같이, 일 실시예에 따른, 전자 장치는, 번역 기능을 실행하여 전자 문서의 적어도 일부분(예, 동작(310)의 제1 텍스트)을 변경할 시, 상기 변경된 적어도 일부분에 표시될 콘텐트(예, 동작(340)의 제2 텍스트) 및 다른 콘텐트 사이의 위치 관계를 체크할 수 있다. 상기 콘텐트가 상기 다른 콘텐트와 중첩되거나, 또는 충돌될(collided) 시, 전자 장치는 상기 중첩 및/또는 상기 충돌을 해결하기 위하여, 동작(360)의 배치 알고리즘을 수행할 수 있다. 상기 배치 알고리즘에 기반하여, 전자 장치는 상기 콘텐트가 자연스럽게 혼합된(또는 융합된) 전자 문서를 생성할 수 있거나, 또는 표시할 수 있다. As described above, according to one embodiment, when the electronic device executes a translation function to change at least a portion of an electronic document (e.g., the first text of operation (310)), the electronic device may check a positional relationship between content to be displayed in the changed at least portion (e.g., the second text of operation (340)) and other content. When the content overlaps or collides with the other content, the electronic device may perform the arrangement algorithm of operation (360) to resolve the overlap and/or the collision. Based on the arrangement algorithm, the electronic device may generate or display an electronic document in which the content is naturally mixed (or fused).
일 실시예에 따른, 전자 장치는, 동작(320)의 태그 정보와 같이, 번역 기능을 실행하여 획득된 번역 결과가, 상기 번역 기능을 실행하기 이전의 원문의 스타일을 유지하기 위한 정보를 획득할 수 있거나, 또는 생성할 수 있다. PDF는, 하나의 스타일을 가지는 텍스트들을 하나의 오브젝트에 포함하도록 규격화되었고, 복수의 스타일들을 가지는 텍스트들을 복수의 오브젝트들로 각각 정의하도록 규격화되었다. 일 실시예에 따른, 전자 장치는, 상이한 스타일들을 가지는 텍스트들 각각에 대응하는 복수의 오브젝트들로부터, 동작(320)의 태그 정보를 포함하는 단일 문자열을 생성할 수 있다. 이하에서는, 도 4를 참고하여, 복수의 오브젝트들로부터, 번역 기능을 실행하기 위하여 이용될, 단일 문자열을 생성하는 전자 장치의 예시적인 동작이 설명된다. According to one embodiment, the electronic device may obtain or generate information for maintaining the style of the original text prior to executing the translation function, such as tag information of operation (320), from the translation result obtained by executing the translation function. PDF is standardized to include texts having one style in one object, and is standardized to define texts having multiple styles as multiple objects, respectively. According to one embodiment, the electronic device may generate a single string including the tag information of operation (320) from a plurality of objects corresponding to each of the texts having different styles. Hereinafter, with reference to FIG. 4, an exemplary operation of the electronic device for generating a single string to be used for executing the translation function from a plurality of objects is described.
도 4는, 전자 문서의 텍스트를 나타내는 오브젝트들(420)을 이용하여 번역 기능을 실행하는 전자 장치의 예시적인 동작을 도시한다. 도 1 내지 도 2를 참고하여 설명된 전자 장치(101)는, 도 4를 참고하여 설명되는 동작을 수행할 수 있다. 예를 들어, 도 2의 전자 장치(101) 및/또는 프로세서(210)는, 도 4의 동작을 수행할 수 있다. 도 4의 전자 장치의 동작은, 도 3의 동작들 중 적어도 하나(예, 동작들(320, 330, 340))와 관련될 수 있다. FIG. 4 illustrates exemplary operations of an electronic device that executes a translation function using objects (420) representing text of an electronic document. The electronic device (101) described with reference to FIGS. 1 and 2 can perform the operations described with reference to FIG. 4. For example, the electronic device (101) and/or the processor (210) of FIG. 2 can perform the operations of FIG. 4. The operations of the electronic device of FIG. 4 may be related to at least one of the operations of FIG. 3 (e.g., operations (320, 330, 340)).
도 4를 참고하면, 번역 기능에 기반하여 번역될 예시적인 제1 텍스트(410)(예, "안녕하세요, 제 이름은 홍길동입니다.")가 도시된다. 전자 장치는, 동작(310)의 입력에 기반하여, 제1 텍스트(410)를 식별할 수 있다. 제1 텍스트(410)는 전자 문서(예, 도 2의 파일(280)에 의해 나타나는 전자 문서, 및/또는 도 1의 전자 문서(130))에 포함될 수 있다. Referring to FIG. 4, an exemplary first text (410) to be translated based on a translation function (e.g., "Hello, my name is Hong Gil-dong") is illustrated. The electronic device can identify the first text (410) based on the input of the action (310). The first text (410) may be included in an electronic document (e.g., the electronic document represented by the file (280) of FIG. 2 and/or the electronic document (130) of FIG. 1).
PDF에 기반하는 전자 문서의 제1 텍스트(410)를 번역하기 위한 입력을 수신한 경우, 전자 장치는, 제1 텍스트(410)를 표현하는 오브젝트들(420)을 식별할 수 있다. 오브젝트들(420)은, 상기 전자 문서를 나타내는 파일(예, 도 2의 파일(280))에 포함될 수 있거나, 또는 인코딩될 수 있다. 도 4를 참고하면, 예시적인 스타일을 가지는 제1 텍스트(410)에 대응하는 오브젝트들(420)이 도시된다. 흑백 도면(들)으로 실시예를 설명하기 위하여, 제1 텍스트(410) 내에서 적색을 가지는 부분(예, "이름")이 밑줄로 도시될 수 있다. 제1 텍스트(410) 내에서 상기 부분과 상이한 부분은, 흑색과 같은 지정된 색상(예, 디폴트 색상)을 가지는 것으로 가정한다. 제1 텍스트(410) 내 특정 부분(예, "홍길동")은, 볼드(bold)로 지칭되는 폰트 효과에 의해, 나머지 부분에 대하여, 시각적으로 강조되는 것으로 가정한다. When receiving an input for translating a first text (410) of an electronic document based on PDF, the electronic device may identify objects (420) representing the first text (410). The objects (420) may be included in a file representing the electronic document (e.g., file (280) of FIG. 2 ) or may be encoded. Referring to FIG. 4 , objects (420) corresponding to the first text (410) having an exemplary style are illustrated. To illustrate the embodiment in black and white drawing(s), a portion having a red color (e.g., "Name") within the first text (410) may be underlined. It is assumed that a portion different from the above portion within the first text (410) has a designated color (e.g., a default color), such as black. It is assumed that a specific portion (e.g., "Hong Gil-dong") within the first text (410) is visually emphasized relative to the rest of the portion by a font effect referred to as bold.
PDF는, 상이한 스타일들을 가지는 텍스트들을, 상기 스타일들 각각에 대응하는 상이한 오브젝트들로 정의하도록, 구성될 수 있다. 예시적인 제1 텍스트(410) 내에서, 적색을 가지는 부분("이름"이 표시된 부분)의 앞의 텍스트("안녕하세요, 제 ")가 하나의 오브젝트(예, object[0])로 정의될 수 있다. 예시적인 제1 텍스트(410) 내에서, 적색을 가지는 텍스트("이름")가, 하나의 오브젝트(예, object[1])로 정의될 수 있다. 예시적인 제1 텍스트(410) 내에서, 적색을 가지는 텍스트("이름"), 및 볼드가 적용된 텍스트("홍길동") 사이의 텍스트("은 ")가, 하나의 오브젝트(예, object[3])로 정의될 수 있다. 예시적인 제1 텍스트(410) 내에서, 볼드가 적용된 텍스트가, 하나의 오브젝트(예, object[4])로 정의될 수 있다. 예시적인 제1 텍스트(410) 내에서, 볼드가 적용된 텍스트 이후의 텍스트("입니다.")가, 하나의 오브젝트(예, object[5])로 정의될 수 있다. 예를 들어, 상이한 스타일들을 가지는 부분들(예, "이름" 및 "홍길동" 각각이 기재된 부분들)을 기준으로, 제1 텍스트(410)는, 5 개의 오브젝트들에 의해 표현될 수 있다. 오브젝트들(420)이 저장된 파일을 식별할 시, 전자 장치는 오브젝트들(420)을 순차적으로 렌더링하기 위하여, 제1 텍스트(410)를 포함하는 전자 문서를 렌더링할 수 있다. A PDF can be configured to define texts having different styles as different objects corresponding to each of the styles. In the exemplary first text (410), the text (“Hello, my”) before the part in red (“the part where the name is displayed”) can be defined as one object (e.g., object[0]). In the exemplary first text (410), the text in red (“name”) can be defined as one object (e.g., object[1]). In the exemplary first text (410), the text between the text in red (“name”) and the bold text (“Hong Gil-dong”) can be defined as one object (e.g., object[3]). In the exemplary first text (410), the bold text can be defined as one object (e.g., object[4]). Within the exemplary first text (410), the text following the bold text ("is.") may be defined as a single object (e.g., object[5]). For example, based on portions having different styles (e.g., portions each containing "Name" and "Hong Gil-dong"), the first text (410) may be represented by five objects. When identifying a file in which objects (420) are stored, the electronic device may render an electronic document including the first text (410) to sequentially render the objects (420).
일 실시예에 따른, 전자 장치는, 제1 텍스트(410)에 대한 번역 기능을 실행하기 위한 입력에 응답하여, 상기 제1 텍스트(410), 및 상기 제1 텍스트(410)의 일부분의 스타일을 나타내는 제1 태그를 포함하는 제1 데이터(430)를 획득할 수 있거나, 또는 생성할 수 있다. 제1 데이터(430)를 이용하여, 전자 장치는, 번역 기능을 실행하여, 제1 텍스트로부터 번역된 제2 텍스트를 획득할 수 있다. 예를 들어, 제1 데이터(430)를 이용하여, 전자 장치는 상기 제2 텍스트를 획득하기 위한 번역 기능을 실행할 수 있다. In one embodiment, an electronic device, in response to an input for executing a translation function for a first text (410), may obtain or generate first data (430) including the first text (410) and a first tag representing a style of a portion of the first text (410). Using the first data (430), the electronic device may execute a translation function to obtain a second text translated from the first text. For example, using the first data (430), the electronic device may execute a translation function to obtain the second text.
도 4를 참고하면, 전자 장치에 의해 생성되고, 제1 텍스트(410), 및 상기 제1 텍스트(410)의 적어도 일부분의 스타일들을 나타내는 태그 정보를 포함하는, 제1 데이터(430)가 도시된다. 제1 데이터(430)에 포함된 태그 정보는, 홑화살괄호(pointy bracket)에 의해 감싸진 문자들(예, "<text>", "<red>", "<bold>", "</text>", "</red>", "</bold>")을 포함할 수 있다. 예를 들어, 태그 "<text>"는, 태그 "</text>"와 쌍을 이룰 수 있고, 쌍을 이루는 태그들 사이의 정보가, 전자 문서의 텍스트임을 나타낼 수 있다. 예를 들어, 태그들 "<red>", "</red>"의 쌍은, 쌍을 이루는 태그들 사이의 텍스트의 색상이 적색임을 나타낼 수 있다. 예를 들어, 태그들 "<bold>", "</bold>"의 쌍은, 볼드로 지칭되는 폰트 효과가, 쌍을 이루는 태그들 사이의 텍스트로, 적용됨을 나타낼 수 있다. Referring to FIG. 4, first data (430) is illustrated, which is generated by an electronic device and includes first text (410) and tag information indicating styles of at least a portion of the first text (410). The tag information included in the first data (430) may include characters enclosed in pointy brackets (e.g., "<text>", "<red>", "<bold>", "</text>", "</red>", "</bold>"). For example, the tag "<text>" may be paired with the tag "</text>", and information between the paired tags may indicate that the information between the paired tags is text of an electronic document. For example, the pair of tags "<red>", "</red>" may indicate that the color of the text between the paired tags is red. For example, the pair of tags "<bold>", "</bold>" may indicate that a font effect, referred to as bold, is to be applied to the text between the pair of tags.
일 실시예에 따른, 전자 장치는, 제1 데이터(430)를 이용하여 번역 기능을 실행할 수 있다. 예를 들어, 전자 장치는, 번역 모델(272)로, 상기 제1 데이터(430), 또는 상기 제1 데이터(430)를 나타내는 정보(예, 토큰으로 지칭되는, 제1 데이터(430)의 벡터 표현(vector representation))를 입력할 수 있다. 도 4의 번역 모델(272)은, 도 2의 번역 모델(272)에 대응할 수 있다. 번역 모델(272)은, 전자 장치의 프로세서(예, 도 2의 프로세서(210))에 의해 실행될 수 있거나(예, 온-디바이스 모델), 또는 전자 장치에 연결된 서버에 의해 원격으로(remotely) 실행될 수 있다. According to one embodiment, the electronic device may execute a translation function using first data (430). For example, the electronic device may input the first data (430) or information representing the first data (430) (e.g., a vector representation of the first data (430), referred to as a token) into a translation model (272). The translation model (272) of FIG. 4 may correspond to the translation model (272) of FIG. 2. The translation model (272) may be executed by a processor of the electronic device (e.g., the processor (210) of FIG. 2) (e.g., an on-device model) or may be executed remotely by a server connected to the electronic device.
일 실시예에서, 번역 모델(272)은, 제1 데이터(430)에 포함된 태그 정보를 유지하면서, 제1 데이터(430)에 의해 나타나는 제1 텍스트(410)의 의미(또는 콘텐트)가 유지되도록, 트레이닝될 수 있다. 제1 텍스트(410)를 수신한 번역 모델(272) 내에서, 제1 텍스트(410)에 포함된 태그들(예, "<text>", "<red>", "<bold>", "</text>", "</red>", "</bold>")이, 태그를 나타내는 예약어(또는 예약 태그)로 변경될 수 있다. 예를 들어, 태그 "<text>"는 예약 태그 "<u1>"으로, 태그 "<red>"는, 예약 태그 "<u2>"로 변경될 수 있다. 태그 및 예약 태그 사이의 매핑은 상기 예시에 제한되는 것은 아니다. 일 실시예에서, 번역 모델(272)은, 제1 데이터(430)의 태그들을 제외한 나머지 텍스트들의 번역을 나타내는 프롬프트(예, "태그들을 제외한 텍스트를 번역하라. 태그들은, 번역 결과가 원문과 같은 스타일을 가지도록, 번역 결과 내에 포함되어야 한다.")와 함께 실행될 수 있다. In one embodiment, the translation model (272) may be trained so that the meaning (or content) of the first text (410) represented by the first data (430) is maintained while maintaining the tag information included in the first data (430). Within the translation model (272) that receives the first text (410), tags included in the first text (410) (e.g., "<text>", "<red>", "<bold>", "</text>", "</red>", "</bold>") may be changed to reserved words (or reserved tags) representing tags. For example, the tag "<text>" may be changed to the reserved tag "<u1>", and the tag "<red>" may be changed to the reserved tag "<u2>". The mapping between tags and reserved tags is not limited to the above examples. In one embodiment, the translation model (272) may be executed with a prompt indicating translation of the remaining text excluding the tags of the first data (430) (e.g., "Translate the text excluding the tags. The tags must be included in the translation result so that the translation result has the same style as the original text.").
도 2를 참고하면, 번역 모델(272)을 실행하여 획득된, 예시적인 제2 데이터(440)가 도시된다. 번역 모델(272)을 실행하여 제1 텍스트(410)를 번역할 시, 제1 텍스트(410)에 포함된 태그들이 예약 태그로 변경되는 경우, 번역 모델(272)로부터 출력된 데이터 내에서, 예약 태그들 각각을, 대응하는 태그로 교체하여, 제2 데이터(440)가 생성될 수 있거나, 또는 획득될 수 있다. Referring to FIG. 2, exemplary second data (440) obtained by executing a translation model (272) is illustrated. When translating a first text (410) by executing a translation model (272), if tags included in the first text (410) are changed to reserved tags, the second data (440) may be generated or obtained by replacing each of the reserved tags with a corresponding tag within the data output from the translation model (272).
도 4의 제1 데이터(430) 및 제2 데이터(440)를 참고하면, 제1 데이터(430)에 포함된 태그들이, 제2 데이터(440)에 포함될 수 있고, 제2 데이터(440) 내에서의 태그들의 위치는, 제1 데이터(430) 내에서의 태그들에 의해 감싸진 단어(예, 한국어인 제1 언어의 단어)에 대응하는 다른 단어(예, 영어인 제2 언어의 단어)를 감싸도록, 조절될 수 있다. 예를 들어, 제2 데이터(440) 내에서의 태그들 "<red>", "</red>"의 위치는, 태그들 "<red>", "</red>"에 의해 감싸진 제1 데이터(430) 내 텍스트("이름")의 번역에 대응하는, 제2 데이터(440)의 텍스트("name")를 감싸도록 변경될 수 있다. 예를 들어, 제2 데이터(440) 내에서의 태그들 "<bold>", "</bold>"의 쌍은, 태그들 "<bold>", "</bold>"에 의해 감싸진 제1 데이터(430) 내 텍스트("홍길동")의 번역인, 제2 데이터(440)의 텍스트 "Hong Gil-Dong"를 감싸도록 변경될 수 있다. 예를 들어, 제1 데이터(430)의 텍스트들 전체를 감싸는 태그들 "<text>", "</text>"이, 제2 데이터(440)의 텍스트들 전체를 감싸도록, 제2 데이터(440) 내에서 위치될 수 있다. Referring to the first data (430) and the second data (440) of FIG. 4, tags included in the first data (430) may be included in the second data (440), and the positions of the tags within the second data (440) may be adjusted to surround another word (e.g., a word of a second language, such as English) corresponding to a word (e.g., a word of a first language, such as Korean) surrounded by the tags within the first data (430). For example, the positions of the tags "<red>", "</red>" within the second data (440) may be changed to surround the text ("name") of the second data (440), which corresponds to the translation of the text ("name") within the first data (430) surrounded by the tags "<red>", "</red>". For example, the pair of tags "<bold>", "</bold>" within the second data (440) can be changed to wrap the text "Hong Gil-Dong" of the second data (440), which is a translation of the text ("Hong Gil-Dong") within the first data (430) wrapped by the tags "<bold>", "</bold>". For example, the tags "<text>", "</text>", which wrap all of the texts of the first data (430), can be positioned within the second data (440) to wrap all of the texts of the second data (440).
도 4를 참고하면, 제2 데이터(440)를 획득한, 전자 장치는, 제2 데이터(440)에 의해 나타나는 제2 텍스트(460)를, 디스플레이(예, 도 1 및/또는 도 2의 디스플레이(110)) 상에 표시할 수 있다. 전자 장치는 제2 데이터(440)에 포함된 하나 이상의 태그들을 이용하여, 제2 텍스트(460)의 적어도 일부분의 스타일을 변경할 수 있다. 예를 들어, 전자 장치는, 제2 텍스트(460)의 부분(예, "name")을, 제2 데이터(440)의 태그에 기반하여, 적색으로 표시할 수 있다. 예를 들어, 전자 장치는, 제2 텍스트(460)의 부분(예, "Hong Gil-Dong")을, 제2 데이터(440)의 태그에 기반하여, 굵게 표시할 수 있다. 제2 데이터(440)로부터 제2 텍스트(460)를 직접적으로 생성하거나, 또는 표시하는 전자 장치의 예시적인 동작이 설명되었지만, 실시예가 이에 제한되는 것은 아니다. Referring to FIG. 4, an electronic device that has acquired second data (440) can display second text (460) represented by the second data (440) on a display (e.g., the display (110) of FIG. 1 and/or FIG. 2). The electronic device can change the style of at least a portion of the second text (460) using one or more tags included in the second data (440). For example, the electronic device can display a portion of the second text (460) (e.g., “name”) in red based on a tag of the second data (440). For example, the electronic device can display a portion of the second text (460) (e.g., “Hong Gil-Dong”) in bold based on a tag of the second data (440). Although exemplary operations of an electronic device that directly generates or displays second text (460) from second data (440) have been described, the embodiments are not limited thereto.
예를 들어, 전자 장치는 제2 데이터(440)로부터, PDF에 기반하는 파일 내에 추가될 수 있는 오브젝트들(450)을 생성할 수 있다. 오브젝트들(420)을 참고하여 상술한 바와 같이, 제2 데이터(440)에 포함된 텍스트들의 부분들이 상이한 스타일들을 가지기 때문에, 전자 장치는 제2 데이터(440)로부터 복수의 오브젝트들(450)을 생성할 수 있다. 예를 들어, 제2 데이터(440)에 의해 나타나는 텍스트들(예, "Hello, my name is Hong Gil-Dong.") 내에서, 적색을 가지는 부분 "name" 앞의 텍스트("Hello, my ")가 하나의 오브젝트(예, object[0])로 정의될 수 있다. 예를 들어, 제2 데이터(440)에 의해 나타나는 텍스트들 내에서, 적색을 가지는 텍스트("name")가 하나의 오브젝트(예, object[1])로 정의될 수 있다. 예를 들어, 제2 데이터(440) 내에서, 적색을 가지는 텍스트("name"), 및 볼드가 적용된 텍스트("Hong Gil-Dong") 사이의 텍스트(" is ")가 하나의 오브젝트(예, object[3])로 정의될 수 있다. 예를 들어, 볼드가 적용된 텍스트("Hong Gil-Dong")가 하나의 오브젝트(예, object[4])로 정의될 수 있다. 예를 들어, 제2 데이터(440) 내에서, 볼드가 적용된 텍스트 이후의 텍스트(". ")가, 하나의 오브젝트(예, object[5])로 정의될 수 있다. For example, the electronic device can generate objects (450) that can be added to a PDF-based file from the second data (440). As described above with reference to objects (420), since portions of texts included in the second data (440) have different styles, the electronic device can generate multiple objects (450) from the second data (440). For example, within the texts represented by the second data (440) (e.g., "Hello, my name is Hong Gil-Dong."), the text before the portion "name" having a red color ("Hello, my ") can be defined as one object (e.g., object[0]). For example, within the texts represented by the second data (440), the text "name" having a red color can be defined as one object (e.g., object[1]). For example, within the second data (440), the text ("is") between the red text ("name") and the bold text ("Hong Gil-Dong") may be defined as one object (e.g., object[3]). For example, the bold text ("Hong Gil-Dong") may be defined as one object (e.g., object[4]). For example, within the second data (440), the text (".") following the bold text may be defined as one object (e.g., object[5]).
전자 장치가 제1 텍스트(410)로부터 번역된 제2 텍스트(460)를 획득한 일 실시예에서, 도 3의 동작(370)의 오브젝트는, 도 4의 오브젝트들(450)을 포함할 수 있다. 예를 들어, 전자 장치는, 전자 문서 내에서, 제1 텍스트(410)에 대응하는 오브젝트들(420)을, 오브젝트들(450)로 교체할 수 있거나, 또는 변경할 수 있다. 예를 들어, 전자 장치는, 전자 문서 내 오브젝트들(420)로, 오브젝트들(420)에 대응하는 제1 텍스트(410)가 번역 기능에 의해 제거되거나, 또는 숨겨짐을 나타내는 속성 값들을 할당할 수 있다. 전자 장치는 전자 문서 내에, 오브젝트들(450)을 삽입할 수 있거나, 또는 추가할 수 있다. 오브젝트들(450)은, 오브젝트들(450)에 의해 나타나는 제2 텍스트(460)가 번역 기능을 수행한 결과임을 나타내는 속성 값들을 포함할 수 있다. In one embodiment where the electronic device obtains the second text (460) translated from the first text (410), the objects of the operation (370) of FIG. 3 may include the objects (450) of FIG. 4. For example, the electronic device may replace or change the objects (420) corresponding to the first text (410) within the electronic document with the objects (450). For example, the electronic device may assign attribute values to the objects (420) within the electronic document indicating that the first text (410) corresponding to the objects (420) is removed or hidden by the translation function. The electronic device may insert or add the objects (450) within the electronic document. The objects (450) may include attribute values indicating that the second text (460) represented by the objects (450) is a result of performing the translation function.
상술한 바와 같이, 일 실시예에 따른, 전자 장치는 번역 모델(272)에 기반하는 번역 기능을 실행하여, 제2 텍스트(460), 및 제2 텍스트(460)의 적어도 일부분의 스타일을 나타내는, 하나 이상의 태그들을 포함하는 제2 데이터(440)를 획득할 수 있다. 제2 데이터(440)에 포함된 태그들은, 제1 텍스트(410)의 제1 부분의 스타일이, 상기 제1 부분의 번역인, 제2 텍스트(460)의 제2 부분에서 유지되도록, 제2 데이터(440) 내에 포함될 수 있다. 예를 들어, 상기 제1 부분의 스타일을 나타내는 제1 태그를 포함하는 제1 데이터(430)를 이용하여 획득된, 제2 데이터(440)는, 상기 제1 태그에 대응하는 제2 태그를 포함할 수 있다. 상기 제2 태그는, 상기 제1 부분에 대응하는, 제2 부분의 스타일을 나타낼 수 있다. 상기 제2 태그에 의해 나타나는 제2 부분의 스타일은, 상기 제1 부분의 스타일에 대응할 수 있거나, 또는 일치될 수 있다. As described above, according to one embodiment, the electronic device may execute a translation function based on the translation model (272) to obtain second data (440) including a second text (460) and one or more tags indicating the style of at least a portion of the second text (460). The tags included in the second data (440) may be included in the second data (440) such that the style of a first portion of the first text (410) is maintained in a second portion of the second text (460), which is a translation of the first portion. For example, the second data (440) obtained using the first data (430) including a first tag indicating the style of the first portion may include a second tag corresponding to the first tag. The second tag may indicate the style of the second portion corresponding to the first portion. The style of the second portion indicated by the second tag may correspond to or be identical to the style of the first portion.
제1 텍스트(410)에 대한 번역 기능을 실행하여 획득된, 제2 텍스트(460)를 표시하기 위하여, 전자 장치는, 상기 제2 텍스트(460)를 표시하기 위한 영역의 사이즈를 식별할 수 있다. 상기 영역의 사이즈는, 제2 데이터(440)에 포함된 태그들에 기반하여 계산될 수 있거나, 또는 식별될 수 있다. 이하에서는, 도 5를 참고하여, 제2 데이터(440)에 의해 나타나는, 제2 텍스트(460)를 표시하기 위한 영역의 사이즈에 기반하여, 제2 텍스트(460)를 포함하는 전자 문서를 표시하는 전자 장치의 예시적인 동작이 설명된다. In order to display the second text (460) obtained by executing a translation function for the first text (410), the electronic device can identify the size of the area for displaying the second text (460). The size of the area can be calculated or identified based on tags included in the second data (440). Hereinafter, with reference to FIG. 5, an exemplary operation of the electronic device for displaying an electronic document including the second text (460) based on the size of the area for displaying the second text (460) indicated by the second data (440) is described.
도 5는, 텍스트를 표시하기 위한 배치 알고리즘(예, 도 3을 참고하여 설명된 제1 방식)을 실행하는 전자 장치의 동작에 대한 흐름도를 도시한다. 도 1 내지 도 2의 전자 장치(101)는, 도 5를 참고하여 설명되는 동작을 수행할 수 있다. 예를 들어, 도 2의 전자 장치(101) 및/또는 프로세서(210)는 도 5의 동작들 중 적어도 하나를 수행할 수 있다. 도 5의 동작들의 순서는, 예시적인 것으로, 실시예가 이에 제한되는 것은 아니다. 예를 들어, 전자 장치는 도 5의 동작들을, 도 5의 동작들의 순서와 다른 순서로 수행할 수 있다. 예를 들어, 전자 장치는 도 5의 동작들 중 적어도 두 동작들을 실질적으로 동시에 수행할 수 있다. FIG. 5 illustrates a flowchart of operations of an electronic device executing a layout algorithm for displaying text (e.g., the first method described with reference to FIG. 3). The electronic device (101) of FIGS. 1 and 2 may perform the operations described with reference to FIG. 5. For example, the electronic device (101) and/or the processor (210) of FIG. 2 may perform at least one of the operations of FIG. 5. The order of the operations of FIG. 5 is exemplary, and the embodiment is not limited thereto. For example, the electronic device may perform the operations of FIG. 5 in a different order than the order of the operations of FIG. 5. For example, the electronic device may perform at least two of the operations of FIG. 5 substantially simultaneously.
도 5의 동작들은, 동작(360)의 배치 알고리즘의 적어도 일부로써, 전자 장치에 의해 수행될 수 있다. 예를 들어, 전자 장치는, 제1 텍스트로부터 번역된 제2 텍스트를 포함하는 전자 문서를 표시할 시, 제2 텍스트를 표시하기 위한 전자 문서의 영역을 결정하기 위하여, 도 5의 동작들을 수행할 수 있다. 예를 들어, 전자 장치는, 제1 텍스트를 포함하는 전자 문서의 제1 영역의 사이즈 보다, 제2 텍스트를 표시하기 위한 영역의 사이즈가 큰(또는 넓은) 경우, 도 5의 동작들을 수행할 수 있다. 또는, 제1 텍스트의 문자들의 길이 보다, 제1 텍스트로부터 번역된 제2 텍스트의 문자들의 길이가 더 긴 경우, 전자 장치는 도 5의 동작들을 수행할 수 있다. The operations of FIG. 5 may be performed by the electronic device as at least a part of the arrangement algorithm of operation (360). For example, the electronic device may perform the operations of FIG. 5 to determine an area of the electronic document for displaying the second text when displaying an electronic document including a second text translated from a first text. For example, the electronic device may perform the operations of FIG. 5 when the size of the area for displaying the second text is larger (or wider) than the size of the first area of the electronic document including the first text. Alternatively, the electronic device may perform the operations of FIG. 5 when the length of characters of the second text translated from the first text is longer than the length of characters of the first text.
도 5를 참고하면, 동작(510) 내에서, 일 실시예에 따른, 전자 장치는, 제1 텍스트가 위치된, 전자 문서의 제1 영역에 인접한 공백 영역을 이용하여, 제1 텍스트로부터 번역된 제2 텍스트가 표시될 영역을 결정할 수 있다. 동작(510)의 제1 텍스트는, 도 1의 제1 텍스트(131), 및/또는 도 4의 제1 텍스트(410)를 포함할 수 있다. 전자 장치가 PDF에 기반하는 전자 문서의 제1 텍스트를 표시할 시, 제1 텍스트는, 하나 이상의 오브젝트들(예, 도 4의 오브젝트들(420))에 대응할 수 있다. 동작(510)의 제2 텍스트는, 도 1의 제2 텍스트(151), 및/또는 도 4의 제2 텍스트(460)를 포함할 수 있다. 예를 들어, 동작(510)의 제2 텍스트는, 동작(510)의 제1 텍스트에 대응할 수 있다. PDF에 기반하는 전자 문서 내에서, 제2 텍스트는, 하나 이상의 오브젝트들(예, 도 4의 오브젝트들(450))에 대응할 수 있다. Referring to FIG. 5, in operation (510), according to one embodiment, the electronic device may determine an area in which a second text translated from the first text is to be displayed, using a blank area adjacent to a first area of the electronic document where the first text is located. The first text of operation (510) may include the first text (131) of FIG. 1 and/or the first text (410) of FIG. 4. When the electronic device displays the first text of the electronic document based on PDF, the first text may correspond to one or more objects (e.g., objects (420) of FIG. 4). The second text of operation (510) may include the second text (151) of FIG. 1 and/or the second text (460) of FIG. 4. For example, the second text of operation (510) may correspond to the first text of operation (510). Within an electronic document based on PDF, the second text may correspond to one or more objects (e.g., objects (450) of FIG. 4).
동작(510)의 영역을 결정하는 동작은, 동작(510)의 영역의 치수들(예, 너비, 높이, 및/또는 넓이) 중 적어도 하나를 변경(예, 증가)하는 동작을 포함할 수 있다. 예를 들어, 전자 장치는, 동작(510)의 영역의 너비를, 제1 영역의 너비 이상으로 증가할 수 있다. 전자 장치는 동작(510)의 영역의 너비를, 제1 영역의 너비, 및 제1 영역에 인접한 공백 영역(예, 수평 방향을 따라 제1 영역에 연결된 공백 영역)의 너비의 합 까지 증가할 수 있다. 예를 들어, 전자 장치는 동작(510)의 영역의 높이를, 제1 영역의 높이 이상으로 증가할 수 있다. 전자 장치는 동작(510)의 영역의 높이를, 제1 영역의 높이, 및 제1 영역에 인접한 공백 영역(예, 수직 방향을 따라 제1 영역에 연결된 공백 영역)의 높이의 합 까지 증가할 수 있다. 전자 장치는 제1 영역 및 공백 영역을 포함하는 영역 내에서, 동작(510)의 영역을 증가할 수 있다. 도 5의 동작(510)은, 도 3을 참고하여 설명된, 제1 방식에 대응할 수 있다. 동작(510)을 수행하는 전자 장치의 일 실시예가, 도 6, 도 7a, 및/또는 도 7b를 참고하여 설명된다. The operation of determining the area of the operation (510) may include an operation of changing (e.g., increasing) at least one of the dimensions (e.g., width, height, and/or area) of the area of the operation (510). For example, the electronic device may increase the width of the area of the operation (510) to be greater than or equal to the width of the first area. The electronic device may increase the width of the area of the operation (510) to be equal to or greater than the width of the first area and the width of a blank area adjacent to the first area (e.g., a blank area connected to the first area along a horizontal direction). For example, the electronic device may increase the height of the area of the operation (510) to be equal to or greater than the height of the first area. The electronic device may increase the height of the area of the operation (510) to be equal to or greater than the height of the first area and the height of a blank area adjacent to the first area (e.g., a blank area connected to the first area along a vertical direction). The electronic device may increase the area of the operation (510) within an area including the first area and the blank area. The operation (510) of FIG. 5 may correspond to the first method described with reference to FIG. 3. An embodiment of an electronic device performing the operation (510) is described with reference to FIG. 6, FIG. 7a, and/or FIG. 7b.
도 5를 참고하면, 동작(520) 내에서, 일 실시예에 따른, 전자 장치는, 제2 텍스트가 전자 문서의 다른 콘텐트와 중첩되는지 여부를 결정할 수 있거나, 또는 체크할 수 있다. 예를 들어, 동작(510)의 결정된 영역에 제2 텍스트를 표시할 시, 전자 장치는 상기 제2 텍스트가 전자 문서의 다른 콘텐트와 중첩되는지 여부를 확인할 수 있다. 제2 텍스트가 다른 콘텐트와 중첩되지 않는 경우(520-아니오), 전자 장치는 동작(560)을 수행할 수 있다. 제2 텍스트가 다른 콘텐트와 중첩되는 경우(520-예), 전자 장치는 동작(530)을 수행할 수 있다. 제1 영역 및 공백 영역의 합이, 제2 텍스트를 표시하기 위하여 요구되는 영역의 사이즈 보다 작은 경우, 제2 텍스트가 다른 콘텐트와 중첩될 수 있다. Referring to FIG. 5, in operation (520), according to one embodiment, the electronic device may determine or check whether the second text overlaps with other content of the electronic document. For example, when displaying the second text in the determined area of operation (510), the electronic device may check whether the second text overlaps with other content of the electronic document. If the second text does not overlap with other content (520—No), the electronic device may perform operation (560). If the second text overlaps with other content (520—Yes), the electronic device may perform operation (530). If the sum of the first area and the blank area is smaller than the size of the area required to display the second text, the second text may overlap with other content.
도 5를 참고하면, 동작(530) 내에서, 일 실시예에 따른, 전자 장치는, 제2 텍스트의 스타일(예, 폰트 사이즈, 자간, 및/또는 라인 간격)을 변경할 수 있다. 예를 들어, 전자 장치는, 제2 텍스트를 표시하기 위한 전자 문서의 영역의 사이즈가 감소되도록, 제2 텍스트의 스타일을 변경할 수 있다. 전자 장치는, 제2 텍스트의 스타일을, 제2 텍스트와 다른 전자 문서 내 텍스트의 스타일에 기반하여 변경할 수 있다. 예를 들어, 전자 장치는, 제2 텍스트와 다른 텍스트의 폰트 사이즈 및 제2 텍스트의 폰트 사이즈의 관계에 기반하여, 제2 텍스트의 폰트 사이즈를 줄일 수 있다. 예를 들어, 제2 텍스트의 폰트 사이즈가 상기 다른 텍스트의 상기 폰트 사이즈 보다 큰 경우, 전자 장치는 상기 다른 텍스트의 상기 폰트 사이즈 이상의 범위 내에서, 상기 제2 텍스트의 폰트 사이즈를 줄일 수 있다. 실시예가 이에 제한되는 것은 아니며, 전자 장치는, 제2 텍스트의 부분들의 폰트 사이즈들의 관계에 기반하여, 제2 텍스트의 스타일을 변경할 수 있다. 도 5의 동작(530)은, 도 3을 참고하여 설명된, 제2 방식에 대응할 수 있다. 동작(530)을 수행하는 전자 장치의 일 실시예가, 도 8, 도 9, 및/또는 도 10을 참고하여 설명된다. Referring to FIG. 5, in operation (530), according to one embodiment, the electronic device may change the style (e.g., font size, kerning, and/or line spacing) of the second text. For example, the electronic device may change the style of the second text so that the size of the area of the electronic document for displaying the second text is reduced. The electronic device may change the style of the second text based on the style of text in the electronic document other than the second text. For example, the electronic device may reduce the font size of the second text based on the relationship between the font sizes of the second text and the other text and the font size of the second text. For example, if the font size of the second text is larger than the font size of the other text, the electronic device may reduce the font size of the second text within a range greater than or equal to the font size of the other text. The embodiment is not limited thereto, and the electronic device may change the style of the second text based on the relationship between the font sizes of portions of the second text. The operation (530) of FIG. 5 may correspond to the second method described with reference to FIG. 3. An embodiment of an electronic device performing the operation (530) is described with reference to FIG. 8, FIG. 9, and/or FIG. 10.
도 5를 참고하면, 동작(540) 내에서, 일 실시예에 따른, 전자 장치는, 변경된 스타일을 가지는 제2 텍스트가 전자 문서의 다른 콘텐트와 중첩되는 지 여부를 결정할 수 있다. 예를 들어, 동작(530)의 변경된 스타일에 기반하여 제2 텍스트를 표시할 시, 전자 장치는 상기 제2 텍스트가 전자 문서의 다른 콘텐트와 중첩되는지 여부를 확인할 수 있거나, 또는 체크할 수 있다. 제2 텍스트가 다른 콘텐트와 중첩되는 경우(540-예), 전자 장치는 동작(550)을 수행할 수 있다. 제2 텍스트가 다른 콘텐트와 중첩되지 않는 경우(540-아니오), 전자 장치는 동작(560)을 수행할 수 있다. 실시예가 이에 제한되는 것은 아니며, 변경된 스타일을 가지는 제2 텍스트를 표시하기 위한 영역의 사이즈가 제1 영역의 사이즈 보다 큰 경우, 전자 장치는 동작(550)을 수행할 수 있다. Referring to FIG. 5, in operation (540), according to an embodiment, the electronic device may determine whether the second text with the changed style overlaps with other content of the electronic document. For example, when displaying the second text based on the changed style of operation (530), the electronic device may determine or check whether the second text overlaps with other content of the electronic document. If the second text overlaps with other content (540 - Yes), the electronic device may perform operation (550). If the second text does not overlap with other content (540 - No), the electronic device may perform operation (560). The embodiment is not limited thereto, and if the size of the area for displaying the second text with the changed style is larger than the size of the first area, the electronic device may perform operation (550).
도 5를 참고하면, 동작(550) 내에서, 일 실시예에 따른, 전자 장치는, 전자 문서의 페이지를 변경(예, 확대, 및/또는 추가)하여, 다른 콘텐트와 중첩되지 않는, 제2 텍스트가 표시될 전자 문서 내 영역을 결정할 수 있다. 동작(550)의 페이지는, 전자 문서 내에서 설정된 가상 페이지일 수 있다. 전자 문서를 인쇄할 시, 실제 페이지 내에서의 전자 문서의 형태를 표시하기 위하여, 하나 이상의 가상 페이지들이 전자 문서 내에서 설정될 수 있다. 예를 들어, 가상 페이지는, 실제 페이지(예, A4 시트 및/또는 U.S 레터 시트)의 사이즈에 대응하도록 설정될 수 있다. Referring to FIG. 5 , in operation (550), an electronic device according to an embodiment may determine an area within the electronic document where second text will be displayed that does not overlap with other content by modifying (e.g., enlarging and/or adding) a page of the electronic document. The page of operation (550) may be a virtual page set within the electronic document. When printing the electronic document, one or more virtual pages may be set within the electronic document to display the form of the electronic document within the actual page. For example, the virtual page may be set to correspond to the size of an actual page (e.g., an A4 sheet and/or a U.S. Letter sheet).
예를 들어, 전자 장치는, 제2 텍스트가 위치된, 전자 문서의 페이지를 확대할 수 있다. 확대된 페이지 내에서, 전자 장치는, 제2 텍스트에 인접한 전자 문서의 다른 콘텐트를 이동하여, 상기 제2 텍스트가 상기 다른 콘텐트와 중첩되지 않게 만들 수 있다. 예를 들어, 전자 장치는, 제2 텍스트가 위치된 전자 문서의 페이지 이후에, 페이지를 추가할 수 있다. 추가된 페이지로, 전자 장치는, 제2 텍스트에 인접한 전자 문서의 다른 콘텐트를 이동할 수 있다. 다른 콘텐트가 추가된 페이지로 이동되는 경우, 제2 텍스트가 위치된 전자 문서의 페이지 내에서, 공백 영역이 확대될 수 있다. 확대된 공백 영역을 이용하여, 전자 장치는 다른 콘텐트와 중첩되지 않는 제2 텍스트를 표시할 수 있다. 도 5의 동작(550)은, 도 3을 참고하여 설명된, 제3 방식에 대응할 수 있다. 동작(550)을 수행하는 전자 장치의 일 실시예가, 도 11 및/또는 도 12를 참고하여 설명된다. For example, an electronic device may enlarge a page of an electronic document where a second text is located. Within the enlarged page, the electronic device may move other content of the electronic document adjacent to the second text so that the second text does not overlap with the other content. For example, the electronic device may add a page after the page of the electronic document where the second text is located. To the added page, the electronic device may move other content of the electronic document adjacent to the second text. When moving to the page where the other content is added, a blank area within the page of the electronic document where the second text is located may be enlarged. Using the enlarged blank area, the electronic device may display the second text that does not overlap with the other content. Operation (550) of FIG. 5 may correspond to the third method described with reference to FIG. 3. An embodiment of an electronic device performing operation (550) is described with reference to FIG. 11 and/or FIG. 12.
도 5를 참고하면, 동작(560) 내에서, 일 실시예에 따른, 전자 장치는, 제2 텍스트를 포함하는 전자 문서를 표시할 수 있다. 도 5를 참고하여 상술한 바와 같이, 제1 방식 내지 제3 방식이 순차적으로 (또는 선택적으로) 수행된 이후, 전자 문서 내에서, 제2 텍스트 및 다른 콘텐트가 서로 이격될 수 있다. 동작(560) 내에서, 전자 장치는 제2 텍스트, 및 제2 텍스트로부터 이격된 다른 콘텐트를 포함하는, 전자 문서를 표시할 수 있다. 실시예가 이에 제한되는 것은 아니며, 전자 장치는 제2 텍스트를 포함하는, 동작(560)의 전자 문서를 저장할 수 있거나, 또는 인쇄할 수 있다. Referring to FIG. 5 , in operation (560), according to one embodiment, an electronic device may display an electronic document including a second text. As described above with reference to FIG. 5 , after the first to third methods are sequentially (or selectively) performed, the second text and other content may be spaced apart from each other within the electronic document. In operation (560), the electronic device may display an electronic document including the second text and other content spaced apart from the second text. The embodiment is not limited thereto, and the electronic device may store or print the electronic document of operation (560) including the second text.
도 6은, 공백 영역을 이용하여 전자 문서 내 텍스트의 영역을 결정하는 전자 장치의 동작에 대한 흐름도를 도시한다. 도 1 내지 도 2의 전자 장치(101)는, 도 6을 참고하여 설명되는 동작을 수행할 수 있다. 예를 들어, 도 2의 전자 장치(101) 및/또는 프로세서(210)는 도 6을 참고하여 설명되는 동작을 수행할 수 있다. 도 6의 동작들은, 도 3의 동작(360), 및/또는 도 5의 동작(510)과 관련될 수 있다. 도 6의 동작들의 순서는 예시적인 것으로, 실시예가 이에 제한되는 것은 아니다. 예를 들어, 전자 장치는 도 6의 동작들을, 도 6에 도시된 순서와 다르게 수행할 수 있다. 예를 들어, 전자 장치는 도 6의 동작들 중 적어도 두 동작들을 실질적으로 동시에 수행할 수 있다. FIG. 6 is a flowchart illustrating an operation of an electronic device that determines an area of text within an electronic document using a blank area. The electronic device (101) of FIGS. 1 and 2 may perform the operation described with reference to FIG. 6. For example, the electronic device (101) and/or the processor (210) of FIG. 2 may perform the operation described with reference to FIG. 6. The operations of FIG. 6 may be related to operation (360) of FIG. 3 and/or operation (510) of FIG. 5. The order of the operations of FIG. 6 is exemplary, and the embodiment is not limited thereto. For example, the electronic device may perform the operations of FIG. 6 in a different order than that illustrated in FIG. 6. For example, the electronic device may perform at least two of the operations of FIG. 6 substantially simultaneously.
도 6을 참고하면, 동작(610) 내에서, 일 실시예에 따른, 전자 장치는, 제1 텍스트가 위치된, 전자 문서의 제1 영역에 대하여, 제1 방향(예, 수직 방향)에 위치된 공백 영역을 체크할 수 있다. 동작(610)의 제1 텍스트는, 도 1의 제1 텍스트(131), 및/또는 도 4의 제1 텍스트(410)를 포함할 수 있다. 전자 문서 내에서, 동작(610)의 공백 영역은, 동작(610)의 제1 영역과, 상기 제1 방향을 따라 연결될 수 있거나, 또는 접촉될 수 있다. 제1 방향에 위치된 공백 영역을 체크한 전자 장치는, 동작(620)을 수행할 수 있다. Referring to FIG. 6, in operation (610), according to an embodiment, an electronic device may check a blank area located in a first direction (e.g., vertical direction) with respect to a first area of an electronic document where a first text is located. The first text of operation (610) may include the first text (131) of FIG. 1 and/or the first text (410) of FIG. 4. Within the electronic document, the blank area of operation (610) may be connected to or in contact with the first area of operation (610) along the first direction. The electronic device that has checked the blank area located in the first direction may perform operation (620).
도 6을 참고하면, 동작(620) 내에서, 일 실시예에 따른, 전자 장치는, 제1 텍스트로부터 번역된 제2 텍스트를, 제1 영역, 및 제1 방향에 위치된 공백 영역을 이용하여 표시할 수 있는지 여부를 결정할 수 있거나, 또는 식별할 수 있다. 동작(620)의 제2 텍스트는, 도 1의 제2 텍스트(151), 및/또는 도 4의 제2 텍스트(460)를 포함할 수 있다. 동작(620)의 제2 텍스트는, 동작(610)의 제1 텍스트에 대한 번역 기능을 실행한 결과일 수 있다. 예를 들어, 전자 장치는, 제1 영역, 및 제1 방향에 위치된 공백 영역을 이용하여 제1 텍스트로부터 번역된 제2 텍스트 전체를 표시할 수 있는지 여부를 체크할 수 있다. 제2 텍스트가, 제1 영역, 및 동작(610)의 공백 영역에 포함되는 경우(620-예), 전자 장치는 동작(660)을 수행할 수 있다. 제2 텍스트를 표시하기 위한 영역의 사이즈가, 제1 영역, 및 동작(610)의 공백 영역을 초과하는 경우(620-아니오), 전자 장치는 동작(630)을 수행할 수 있다. Referring to FIG. 6, in operation (620), according to one embodiment, the electronic device may determine or identify whether a second text translated from a first text can be displayed using a first area and a blank area located in a first direction. The second text of operation (620) may include the second text (151) of FIG. 1 and/or the second text (460) of FIG. 4. The second text of operation (620) may be a result of executing a translation function for the first text of operation (610). For example, the electronic device may check whether the entire second text translated from the first text can be displayed using the first area and the blank area located in the first direction. If the second text is included in the first area and the blank area of operation (610) (620 - Yes), the electronic device may perform operation (660). If the size of the area for displaying the second text exceeds the first area and the blank area of the operation (610) (620-No), the electronic device can perform the operation (630).
도 6을 참고하면, 동작(630) 내에서, 일 실시예에 따른, 전자 장치는, 제1 영역에 대하여, 제1 방향에 수직인 제2 방향(예, 수평 방향)에 위치된 공백 영역을 체크할 수 있다. 전자 문서 내에서, 동작(630)의 공백 영역은, 동작(610)의 제1 영역과, 상기 제2 방향을 따라 연결될 수 있거나, 또는 접촉될 수 있다. 제2 방향에 위치된 공백 영역을 체크한 전자 장치는, 동작(640)을 수행할 수 있다. 예를 들어, 동작(640)은, 제2 방향을 따라 제1 영역 옆에 위치된 공백 영역이 존재할 시, 수행될 수 있다. Referring to FIG. 6, in operation (630), according to an embodiment, an electronic device may check for a blank area located in a second direction (e.g., horizontal direction) perpendicular to a first direction with respect to a first area. In an electronic document, the blank area of operation (630) may be connected to or in contact with the first area of operation (610) along the second direction. The electronic device that has checked the blank area located in the second direction may perform operation (640). For example, operation (640) may be performed when there is a blank area located next to the first area along the second direction.
도 6을 참고하면, 동작(640) 내에서, 일 실시예에 따른, 전자 장치는, 제1 영역, 및 제2 방향에 위치된 공백 영역을 이용하여, 제1 텍스트로부터 번역된 제2 텍스트를 표시할 수 있는지 여부를 결정할 수 있거나, 또는 식별할 수 있다. 예를 들어, 전자 장치는, 제1 영역, 및 제2 방향에 위치된 공백 영역을 이용하여, 제1 텍스트로부터 번역된 제2 텍스트 전체를 표시할 수 있는지 여부를 체크할 수 있다. 제2 텍스트가, 제1 영역, 및 동작(630)의 공백 영역에 포함되는 경우(640-예), 전자 장치는 동작(660)을 수행할 수 있다. 제2 텍스트가, 제1 영역, 및 동작(630)의 공백 영역에 포함되지 않는 경우(640-아니오), 전자 장치는 동작(650)을 수행할 수 있다. Referring to FIG. 6, in operation (640), according to one embodiment, the electronic device may determine or identify whether it can display a second text translated from a first text using the first area and the blank area located in the second direction. For example, the electronic device may check whether it can display the entire second text translated from the first text using the first area and the blank area located in the second direction. If the second text is included in the first area and the blank area of operation (630) (640—Yes), the electronic device may perform operation (660). If the second text is not included in the first area and the blank area of operation (630) (640—No), the electronic device may perform operation (650).
도 6의 동작들(610, 620, 630, 640)을 참고하면, 수직 방향에서의 공백 영역을 우선적으로 체크한 다음, 수평 방향에서의 공백 영역을 체크하는 전자 장치의 일 실시예가 설명되었지만, 실시예가 이에 제한되는 것은 아니다. 예를 들어, 전자 장치는 수평 방향에서의 공백 영역을 먼저 체크한 다음, 수직 방향에서의 공백 영역을 체크할 수 있다. 예를 들어, 전자 장치는, 제1 영역, 제1 영역의 수직 방향에 위치된 공백 영역, 및 제1 영역의 수평 방향에 위치된 공백 영역의 결합을 이용하여 제2 텍스트를 표시할 수 있는지 여부를 체크할 수 있거나, 또는 결정할 수 있다. 상기 결합에 제2 텍스트를 표시할 수 있는 경우, 전자 장치는 동작(660)을 수행할 수 있다. 상기 결합에 제2 텍스트를 표시할 수 없는 경우, 전자 장치는 동작(650)을 수행할 수 있다. Referring to operations (610, 620, 630, 640) of FIG. 6, an embodiment of an electronic device that first checks a blank area in a vertical direction and then checks a blank area in a horizontal direction has been described, but the embodiment is not limited thereto. For example, the electronic device may first check a blank area in a horizontal direction and then check a blank area in a vertical direction. For example, the electronic device may check or determine whether a second text can be displayed using a combination of a first area, a blank area positioned vertically of the first area, and a blank area positioned horizontally of the first area. If the second text can be displayed in the combination, the electronic device may perform operation (660). If the second text cannot be displayed in the combination, the electronic device may perform operation (650).
도 6을 참고하면, 동작(650) 내에서, 일 실시예에 따른, 전자 장치는, 제1 텍스트로부터 번역된, 제2 텍스트가 표시될 영역의 사이즈를 확대할 수 없는 것으로 결정할 수 있다. 제1 영역에, 제1 영역과 인접한 어느 공백 영역을 결합하여도, 제2 텍스트를 표시하기 위하여 요구되는 영역의 사이즈 이상의 사이즈를 가지는 영역이 형성되지 않는 경우, 동작(650)이 수행될 수 있다. 동작(650)을 수행하는 전자 장치는, 도 6에 도시된 방식(예, 도 3을 참고하여 설명된, 제1 방식)과 상이한 방식(예, 도 3을 참고하여 설명된, 제2 방식 및/또는 제3 방식)을 수행할 수 있다. Referring to FIG. 6, in operation (650), according to one embodiment, the electronic device may determine that the size of an area where a second text translated from a first text is to be displayed cannot be enlarged. If, in the first area, combining any blank area adjacent to the first area does not form an area having a size larger than the size of the area required to display the second text, operation (650) may be performed. The electronic device performing operation (650) may perform the operation in a manner different from the manner illustrated in FIG. 6 (e.g., the first manner described with reference to FIG. 3) (e.g., the second manner and/or the third manner described with reference to FIG. 3).
도 6을 참고하면, 동작(660) 내에서, 일 실시예에 따른, 전자 장치는, 동작들(620, 640) 중 적어도 하나에 기반하여 식별된 공백 영역, 및 제1 영역을 포함하는, 제2 영역에, 제2 텍스트를 표시하기로 결정할 수 있다. 예를 들어, 전자 장치는 도 3의 동작들(370, 380, 390)을 수행할 수 있다. 예를 들어, 전자 장치는 도 5의 동작(560)을 수행할 수 있다. 예를 들어, 전자 장치는, 상기 제2 영역에서 상기 제2 텍스트를 포함하는, 전자 문서를 표시할 수 있거나, 저장할 수 있거나, 또는 인쇄할 수 있다. Referring to FIG. 6, in operation (660), according to one embodiment, the electronic device may determine to display second text in a second area, including a blank area identified based on at least one of operations (620, 640) and the first area. For example, the electronic device may perform operations (370, 380, 390) of FIG. 3. For example, the electronic device may perform operation (560) of FIG. 5. For example, the electronic device may display, store, or print an electronic document including the second text in the second area.
상술한 바와 같이, 전자 장치는, 제2 텍스트가 표시될 전자 문서의 페이지 내에 형성된 공백 영역을 이용하여, 상기 제2 텍스트가 표시될 제2 영역을 생성할 수 있거나, 또는 결정할 수 있다. 상기 제2 텍스트를 표시하기 위하여 요구되는 영역의 사이즈가, 제1 텍스트를 표시하기 위한 제1 영역의 사이즈 보다 큰 경우, 전자 장치는 제1 영역과 공백 영역의 적어도 일부분을 결합하여, 상기 제2 텍스트가 표시될 제2 영역을 결정할 수 있거나, 또는 생성할 수 있다. As described above, the electronic device can create or determine a second area where the second text is to be displayed by using a blank area formed within a page of an electronic document where the second text is to be displayed. If the size of the area required to display the second text is larger than the size of the first area for displaying the first text, the electronic device can determine or create the second area where the second text is to be displayed by combining at least a portion of the first area and the blank area.
이하에서는, 도 7a 및/또는 도 7b를 참고하여, 도 6의 동작들을 이용하여 제2 텍스트를 표시하기 위한 제2 영역을 결정하는 전자 장치의 예시적인 동작이 설명된다. Hereinafter, with reference to FIG. 7a and/or FIG. 7b, exemplary operations of an electronic device for determining a second area for displaying a second text using the operations of FIG. 6 are described.
도 7a 및 도 7b는, 텍스트가 표시된 전자 문서(700) 내 영역에 인접한 공백 영역을 탐지하는 전자 장치의 예시적인 동작을 도시한다. 도 1 내지 도 2의 전자 장치(101)는, 도 7a 및/또는 도 7b를 참고하여 설명되는 동작을 수행할 수 있다. 예를 들어, 도 2의 전자 장치(101) 및/또는 프로세서(210)는, 도 7a 및/또는 도 7b를 참고하여 설명되는 동작을 수행할 수 있다. 도 7a 및/또는 도 7b의 동작은, 도 3의 동작(360), 도 5의 동작(510), 및/또는 도 6의 동작들과 관련될 수 있다. FIGS. 7A and 7B illustrate exemplary operations of an electronic device for detecting a blank area adjacent to an area within an electronic document (700) in which text is displayed. The electronic device (101) of FIGS. 1 and 2 may perform the operations described with reference to FIGS. 7A and/or 7B . For example, the electronic device (101) and/or the processor (210) of FIG. 2 may perform the operations described with reference to FIGS. 7A and/or 7B . The operations of FIGS. 7A and/or 7B may be related to operations (360) of FIG. 3 , (510) of FIG. 5 , and/or (6).
도 7a를 참고하면, 예시적인 전자 문서(700)를 적어도 부분적으로 번역하는 전자 장치의 일 예시가 설명된다. 예를 들어, 전자 장치가 전자 문서(700)의 제1 영역(710)에 위치된 제1 텍스트("제품을 다시 시작하려면 전원 버튼을 길게 누른 후 다시 시작을 누르세요. 제품이 동작하지 않고 아무 반응이 없으면, 전원 버튼과 음량(하) 버튼을 동시에 7 초 이상 길게 눌러 다시 시작하세요.")를 번역하기 위한 입력을 수신한 것으로 가정한다. 상기 입력을 수신한 전자 장치는, 상기 제1 텍스트, 및 제1 텍스트의 스타일을 나타내는 제1 데이터(예, 도 4의 제1 데이터(430))를 획득할 수 있다. 예를 들어, 제1 텍스트의 부분("다시 시작")에 볼드 효과가 적용된 경우, 전자 장치는 상기 볼드 효과를 나타내는 태그를 포함하는, 상기 제1 데이터를 획득할 수 있다. Referring to FIG. 7A, an example of an electronic device that at least partially translates an exemplary electronic document (700) is illustrated. For example, it is assumed that the electronic device receives an input for translating first text located in a first area (710) of the electronic document (700) (“To restart the product, press and hold the power button and then press Restart. If the product is not working and unresponsive, press and hold the power button and the volume down button simultaneously for more than 7 seconds to restart.”). The electronic device that receives the input can obtain the first text and first data representing the style of the first text (e.g., first data (430) of FIG. 4). For example, if a bold effect is applied to a portion of the first text (“Restart”), the electronic device can obtain the first data including a tag representing the bold effect.
예를 들어, 상기 제1 데이터를 이용하여 번역 기능을 실행하여, 전자 장치는 제1 텍스트로부터 번역된 제2 텍스트("To restart the device, press and hold the Power key, and then tap Restart. If your device is frozen and unresponsive, press and hold the Power key and the Volume Down key simultaneously for more than 7 seconds to restart it.")를 획득할 수 있다. 상기 예시 내에서, 제1 텍스트는, 제2 텍스트의 원문으로, 제1 텍스트를 포함하는 제1 영역(710)은 제2 텍스트의 원문 영역으로 지칭될 수 있다. 전자 장치는, 상기 제2 텍스트, 및 상기 제2 텍스트의 스타일을 나타내는 제2 데이터(예, 도 4의 제2 데이터(450))를 획득할 수 있다. 제2 데이터는, 볼드 효과가 적용된 제1 텍스트의 부분("다시 시작")에 대응하는 제2 텍스트의 부분("Restart")으로 볼드 효과를 적용하기 위한 태그를 포함할 수 있다. For example, by executing a translation function using the first data, the electronic device can obtain second text translated from the first text ("To restart the device, press and hold the Power key, and then tap Restart. If your device is frozen and unresponsive, press and hold the Power key and the Volume Down key simultaneously for more than 7 seconds to restart it."). In the example, the first text may be referred to as the original text of the second text, and the first area (710) including the first text may be referred to as the original text area of the second text. The electronic device can obtain the second text and second data representing the style of the second text (e.g., the second data (450) of FIG. 4). The second data may include a tag for applying a bold effect to a portion of the second text ("Restart") corresponding to a portion of the first text ("Restart") to which the bold effect is applied.
예를 들어, 제2 텍스트, 및 제2 텍스트의 스타일을 나타내는 태그(또는 태그 정보)를 포함하는 제2 데이터를 식별한 전자 장치는, 상기 제2 데이터 및/또는 상기 제2 텍스트를 이용하여, 전자 문서 내에서 제2 텍스트를 표시하기 위한 영역의 사이즈를 식별할 수 있거나, 또는 결정할 수 있다. 식별된 사이즈가, 제1 영역(710)의 사이즈를 초과하는 경우, 전자 장치는, 제1 영역(710)의 제1 텍스트를 대신하여 표시될 제2 텍스트를 표시하기 위하여, 제1 영역(710) 밖의 추가적인 영역을 이용하기로 결정할 수 있다. 예를 들어, 제2 텍스트의 원문 영역을 통하여 상기 제2 텍스트 전체를 표시할 수 없는 경우, 전자 장치는 상기 원문 영역, 및 상기 원문 영역에 인접한 공백 영역의 결합을 통하여, 상기 제2 텍스트를 표시할 수 있다. For example, an electronic device that has identified second data including second text and tags (or tag information) indicating the style of the second text may identify or determine, using the second data and/or the second text, the size of an area for displaying the second text within an electronic document. If the identified size exceeds the size of the first area (710), the electronic device may decide to use an additional area outside the first area (710) to display the second text to be displayed in place of the first text in the first area (710). For example, if the entire second text cannot be displayed through the original area of the second text, the electronic device may display the second text through a combination of the original area and a blank area adjacent to the original area.
도 7a를 참고하면, 전자 장치는 전자 문서(700) 내에서 전자 문서(700)의 수직 방향 또는 수평 방향을 따라, 제1 영역(710)에 인접한, 공백 영역을 체크할 수 있다. 예를 들어, 전자 장치는, 수평 방향을 따라 제1 영역(710)을 확장하여, 제1 영역(710)의 수평 방향에 위치된 공백 영역(720)을 식별할 수 있다. 공백 영역(720)은, 제1 영역(710)에 대한 수평 공백 영역으로 지칭될 수 있다. 예를 들어, 전자 장치는, 수직 방향을 따라 제1 영역(710)을 확장하여, 제1 영역(710)의 수직 방향에 위치된 공백 영역(730)을 식별할 수 있다. 공백 영역(730)은, 제1 영역(710)에 대한 수직 공백 영역으로 지칭될 수 있다. Referring to FIG. 7A, the electronic device may check for a blank area adjacent to the first area (710) along the vertical or horizontal direction of the electronic document (700) within the electronic document (700). For example, the electronic device may expand the first area (710) along the horizontal direction to identify a blank area (720) located in the horizontal direction of the first area (710). The blank area (720) may be referred to as a horizontal blank area with respect to the first area (710). For example, the electronic device may expand the first area (710) along the vertical direction to identify a blank area (730) located in the vertical direction of the first area (710). The blank area (730) may be referred to as a vertical blank area with respect to the first area (710).
도 7a를 참고하면, 수평 공백 영역(예, 공백 영역(720)), 및 수직 공백 영역(예, 공백 영역(730))을 식별한 전자 장치는, 두 공백 영역들의 합집합(union)을 획득할 수 있다. 예를 들어, 전자 장치는, 수평 공백 영역 및 수직 공백 영역 전부를 포함하는 공백 영역(740)을 식별할 수 있다. 공백 영역(740)은, 공백 영역들(720, 730)의 합집합으로, 공백 영역들(720, 730)의 너비들 중 최대 너비(예, 공백 영역(720)의 너비)를 가지고, 공백 영역들(720, 730)의 높이들 중 최대 높이(예, 공백 영역(730)의 높이)를 가질 수 있다. 공백 영역(740)은, 공백 영역들(720, 730)의 유니온 영역으로 지칭될 수 있다. Referring to FIG. 7A, an electronic device that identifies a horizontal blank area (e.g., blank area (720)) and a vertical blank area (e.g., blank area (730)) can obtain a union of the two blank areas. For example, the electronic device can identify a blank area (740) that includes both the horizontal blank area and the vertical blank area. The blank area (740), as a union of the blank areas (720, 730), can have a maximum width (e.g., the width of the blank area (720)) among the widths of the blank areas (720, 730) and a maximum height (e.g., the height of the blank area (730)) among the heights of the blank areas (720, 730). The blank area (740) can be referred to as a union area of the blank areas (720, 730).
예를 들어, 공백 영역들(720, 730)의 유니온 영역인 공백 영역(740)을 식별한 전자 장치는, 공백 영역(740)과 중첩된 (또는 공백 영역(740) 내에 위치된) 전자 문서(700)의 콘텐트를 검색할 수 있거나, 또는 식별할 수 있다. 도 7a를 참고하면, 전자 문서(700)의 제3 텍스트("제품 다시 시작하기")를 포함하는 제3 영역(750)이, 공백 영역(740)과 적어도 부분적으로 중첩될 수 있다. 공백 영역(740)과 중첩된 제3 영역(750)을 탐지한, 전자 장치는, 제3 영역(750)과 중첩되지 않는 공백 영역(740)의 일부분을, 식별할 수 있다. 도 7a를 참고하면, 제3 영역(750)과 중첩되지 않는 공백 영역(740)의 부분을 식별한 전자 장치는, 상기 부분을, 제2 텍스트를 표시하기 위한 제2 영역(760)으로 결정할 수 있다. For example, an electronic device that identifies a blank area (740), which is a union area of blank areas (720, 730), can search for or identify content of an electronic document (700) that overlaps with the blank area (740) (or is located within the blank area (740). Referring to FIG. 7A, a third area (750) including third text (“Restart Product”) of the electronic document (700) can at least partially overlap with the blank area (740). The electronic device that detects the third area (750) that overlaps with the blank area (740) can identify a portion of the blank area (740) that does not overlap with the third area (750). Referring to FIG. 7A, the electronic device that identifies a portion of the blank area (740) that does not overlap with the third area (750) can determine the portion as a second area (760) for displaying a second text.
도 7b를 참고하면, 결정된 제2 영역(760) 내에 제2 텍스트를 표시한 예시적인 상태가 도시된다. 제2 영역(760)의 사이즈가, 제2 텍스트를 표시하기 위하여 요구되는 영역의 사이즈 보다 작은 경우, 전자 장치는 도 7b와 같이 제2 영역(760) 내에 제2 텍스트를 표시하는 대신에, 제2 텍스트의 스타일을 변경하거나(예, 제2 방식), 및/또는 제2 텍스트에 인접한 다른 콘텐트를 이동(예, 제3 방식)할 수 있다. Referring to FIG. 7b, an exemplary state in which a second text is displayed within a determined second area (760) is illustrated. If the size of the second area (760) is smaller than the size of the area required to display the second text, the electronic device may change the style of the second text (e.g., the second method) and/or move other content adjacent to the second text (e.g., the third method), instead of displaying the second text within the second area (760) as shown in FIG. 7b.
상술한 바와 같이, 일 실시예에 따른, 전자 장치는, 제1 텍스트에 대응하는 제1 영역(710)을 포함하고, 제1 영역(710) 보다 넓은 제2 영역(760)을 이용하여, 제1 텍스트 보다 긴 제2 텍스트를 표시할 수 있다. 제1 영역(710)을, 제1 영역(710)의 좌측 가장자리의 x 좌표(left), 제1 영역(710)의 상단 가장자리의 y 좌표(top), 제1 영역(710)의 우측 가장자리의 x 좌표(right), 및 제1 영역(710)의 하단 가장자리의 y 좌표(bottom)의 조합(left, top, right, bottom)으로 나타낼 시, 전자 장치는 상기 조합에 포함된 값들 중 어느 하나를 증가하거나, 감소하여, 제2 텍스트를 표시할 제2 영역(760)을 나타내는 값들의 조합을 획득할 수 있다. As described above, according to one embodiment, the electronic device includes a first area (710) corresponding to the first text, and can display a second text longer than the first text by using a second area (760) wider than the first area (710). When the first area (710) is represented by a combination (left, top, right, bottom) of an x-coordinate of a left edge of the first area (710), a y-coordinate of a top edge of the first area (710), an x-coordinate of a right edge of the first area (710) (right), and a y-coordinate of a bottom edge of the first area (710), the electronic device can obtain a combination of values representing the second area (760) on which the second text is to be displayed by increasing or decreasing any one of the values included in the combination.
예를 들어, (left, top, right, bottom)으로 나타내는 제1 영역(710)을 수평 방향으로 확장하여 생성된, 공백 영역(720)은, (left - a, top, right + b, bottom)와 같이 표현될 수 있다. 예를 들어, 제1 영역(710)을 수직 방향으로 확장하여 생성된, 공백 영역(730)은, (left, top - c, right, bottom + d)와 같이 표현될 수 있다. 예를 들어, 공백 영역(740)은, (left - a, top - c, right + b, bottom + d)와 같이 표현될 수 있다. For example, a blank area (720) generated by horizontally expanding a first area (710) represented by (left, top, right, bottom) can be expressed as (left - a, top, right + b, bottom). For example, a blank area (730) generated by vertically expanding a first area (710) can be expressed as (left, top - c, right, bottom + d). For example, a blank area (740) can be expressed as (left - a, top - c, right + b, bottom + d).
제1 영역(710)을 지정된 좌표 값들의 조합(left, top, right, bottom)으로 나타내는 일 실시예에서, 전자 장치는, 상기 조합의 값들을 차례대로 증가하거나, 또는 감소하여, 제2 영역(760)을 결정할 수 있다. 예를 들어, 전자 장치는 수평 방향을 따라 제1 영역(710)에 인접한 공백 영역으로 확장하기 위하여, 조합(left, top, right, bottom)의 right 값을 증가할 수 있다. 예를 들어, 조합(left, top, right + a, bottom)은, 제1 영역(710) 및, 제1 영역(710)의 우측에 위치된 공백 영역의 결합을 나타낼 수 있다. 상기 공백 영역의 최대 너비 이하의 범위 내에서, 제2 텍스트를 표시하기 위하여 요구되는 사이즈 이상의 사이즈를 가지는 영역을 만드는 a를 식별하는 경우, 전자 장치는 조합(left, top, right + a, bottom)에 의해 나타나는 영역을, 제2 텍스트를 표시하기 위한 영역으로 결정할 수 있다. In one embodiment where the first area (710) is represented by a combination of specified coordinate values (left, top, right, bottom), the electronic device may determine the second area (760) by sequentially increasing or decreasing the values of the combination. For example, the electronic device may increase the right value of the combination (left, top, right, bottom) to extend into a blank area adjacent to the first area (710) along the horizontal direction. For example, the combination (left, top, right + a, bottom) may represent a combination of the first area (710) and a blank area located to the right of the first area (710). When identifying a that creates an area having a size greater than or equal to the size required to display the second text within a range less than or equal to the maximum width of the blank area, the electronic device may determine the area represented by the combination (left, top, right + a, bottom) as an area for displaying the second text.
상기 공백 영역의 최대 너비에서, 제2 텍스트를 표시하기 위하여 요구되는 사이즈 이상의 사이즈를 가지는 영역을 만들 수 없는 경우, 전자 장치는 left, top, 및/또는 bottom을 증가하거나, 감소하여, 제2 텍스트를 표시하기 위한 영역을 결정할 수 있다. 예를 들어, 전자 장치는 제1 영역(710)의 아래에 위치된 공백 영역의 최대 높이 이하의 범위 내에서 bottom 값을 증가하여, 제2 텍스트를 표시하기 위한 영역을 결정할 수 있거나, 또는 생성할 수 있다. If an area having a size larger than the size required to display the second text cannot be created within the maximum width of the above blank area, the electronic device may determine an area for displaying the second text by increasing or decreasing the left, top, and/or bottom. For example, the electronic device may determine or create an area for displaying the second text by increasing the bottom value within a range less than or equal to the maximum height of the blank area located below the first area (710).
조합(left, top, right, bottom)의 right 값을 우선적으로 증가하는 일 실시예가 설명되었지만, 실시예가 이에 제한되는 것은 아니다. 예를 들어, 아랍어인 제2 텍스트를 표시할 시, 아랍어 문자는 우측으로부터 좌측으로 기록되기 때문에, 전자 장치는 조합(left, top, right, bottom)의 left 값을 우선적으로 변경하여(예, 자연수 a에 대하여, (left - a, top, right, bottom)), 제2 텍스트를 표시하기 위한 영역을 식별할 수 있거나, 또는 결정할 수 있다. Although an embodiment has been described in which the right value of the combination (left, top, right, bottom) is preferentially increased, the embodiment is not limited thereto. For example, when displaying a second text in Arabic, since Arabic characters are written from right to left, the electronic device can identify or determine an area for displaying the second text by preferentially changing the left value of the combination (left, top, right, bottom) (e.g., for a natural number a, (left - a, top, right, bottom)).
상술한 바와 같이, 일 실시예에 따른, 전자 장치는, 제1 텍스트를 표시하기 위한 제1 영역(710)을 기준으로, 수평 방향의 공백 영역 및/또는 수직 방향의 공백 영역을 결합하여, 제1 텍스트로부터 번역된 제2 텍스트를 표시하기 위한 제2 영역(760)을 결정할 수 있다. 제1 텍스트에 인접한 공백 영역이 상대적으로 작은 경우, 제1 영역(710)에 공백 영역을 결합하는 것 만으로, 제2 텍스트를 표시하기 위한 영역을 만들 수 없다. 이 경우, 전자 장치는, 제2 텍스트의 스타일을 변경하여, 상기 제2 텍스트가 전자 문서의 다른 콘텐트와 중첩되지 않게 만들 수 있다. As described above, according to one embodiment, the electronic device may determine a second area (760) for displaying a second text translated from the first text by combining a horizontal blank area and/or a vertical blank area based on a first area (710) for displaying a first text. If the blank area adjacent to the first text is relatively small, the area for displaying the second text cannot be created simply by combining the blank area with the first area (710). In this case, the electronic device may change the style of the second text so that the second text does not overlap with other content of the electronic document.
이하에서는, 도 8을 참고하여, 제2 텍스트의 스타일을 변경하는 전자 장치의 예시적인 동작이 설명된다. Below, with reference to FIG. 8, an exemplary operation of an electronic device for changing the style of a second text is described.
도 8은, 텍스트의 스타일을 변경하는 전자 장치의 동작에 대한 흐름도를 도시한다. 도 1 내지 도 2의 전자 장치(101)는, 도 8을 참고하여 설명되는 동작을 수행할 수 있다. 예를 들어, 도 2의 전자 장치(101) 및/또는 프로세서(210)는 도 8을 참고하여 설명되는 동작을 수행할 수 있다. 도 8의 동작들은, 도 3의 동작(360), 및/또는 도 5의 동작(530)과 관련될 수 있다. 도 8의 동작들의 순서는 예시적인 것으로 실시예가 이에 제한되는 것은 아니다. 예를 들어, 전자 장치는 도 8의 동작들을, 도 8에 도시된 순서와 다르게 수행할 수 있다. 예를 들어, 전자 장치는 도 8의 동작들 중 적어도 두 동작들을 실질적으로 동시에 수행할 수 있다. FIG. 8 illustrates a flowchart of operations of an electronic device for changing the style of text. The electronic device (101) of FIGS. 1 and 2 may perform the operations described with reference to FIG. 8. For example, the electronic device (101) and/or the processor (210) of FIG. 2 may perform the operations described with reference to FIG. 8. The operations of FIG. 8 may be related to operation (360) of FIG. 3 and/or operation (530) of FIG. 5. The order of the operations of FIG. 8 is exemplary and the embodiment is not limited thereto. For example, the electronic device may perform the operations of FIG. 8 in a different order from the order illustrated in FIG. 8. For example, the electronic device may perform at least two of the operations of FIG. 8 substantially simultaneously.
도 8을 참고하면, 동작(810) 내에서, 일 실시예에 따른, 전자 장치는, 제1 텍스트로부터 번역된 제2 텍스트의 스타일을 나타내는 속성들의 최소 값들을 식별할 수 있다. 동작(810)의 제1 텍스트는, 도 1의 제1 텍스트(131), 및/또는 도 4의 제1 텍스트(410)를 포함할 수 있다. 동작(810)의 제2 텍스트는, 도 1의 제2 텍스트(151), 및/또는 도 4의 제2 텍스트(460)를 포함할 수 있다. 동작(810)의 속성들은, 텍스트의 형태 및/또는 스타일을 나타내는 파라미터 중에서, 텍스트를 표시하기 위한 영역의 사이즈와 관련된 속성들(예, 폰트 사이즈, 라인 간격, 및/또는 자간)을 포함할 수 있다. 제1 텍스트가 상이한 스타일들을 가지는 문자들을 포함하는 경우, 전자 장치는 상기 문자들 사이의 스타일들의 관계를 이용하여, 상기 문자들 각각에 대응하는 제2 텍스트의 문자들의 스타일들의 최소 값들을 결정할 수 있다. 실시예가 이에 제한되는 것은 아니며, 전자 장치는, 제1 텍스트에 인접한, 전자 문서의 다른 텍스트의 스타일들을 이용하여, 제2 텍스트의 스타일을 결정하기 위하여 이용될, 상기 속성들의 최소 값들을 식별할 수 있거나, 또는 결정할 수 있다. Referring to FIG. 8, in operation (810), according to an embodiment, an electronic device may identify minimum values of attributes representing a style of a second text translated from a first text. The first text of operation (810) may include the first text (131) of FIG. 1 and/or the first text (410) of FIG. 4. The second text of operation (810) may include the second text (151) of FIG. 1 and/or the second text (460) of FIG. 4. The attributes of operation (810) may include, among parameters representing the shape and/or style of the text, attributes related to the size of an area for displaying the text (e.g., font size, line spacing, and/or kerning). When the first text includes characters having different styles, the electronic device may determine minimum values of styles of characters of the second text corresponding to each of the characters by utilizing the relationship of styles between the characters. The embodiment is not limited thereto, and the electronic device may identify or determine the minimum values of the attributes to be used to determine the style of the second text using the styles of other text in the electronic document adjacent to the first text.
도 8을 참고하면, 동작(820) 내에서, 일 실시예에 따른, 전자 장치는, 제2 텍스트의 스타일을 나타내는 속성들 각각이 대응하는 최소 값보다 큰 지 여부를 식별할 수 있거나, 또는 체크할 수 있다. 제2 텍스트의 스타일을 나타내는 속성들 중 적어도 하나가, 동작(810)에 기반하여 결정된 최소 값 보다 큰 경우(820-예), 전자 장치는 동작(830)을 수행할 수 있다. 제2 텍스트의 스타일을 나타내는 속성들 전부가, 동작(810)의 최소 값들과 일치하거나, 또는 작은 경우(820-아니오), 전자 장치는 동작(860)을 수행할 수 있다. Referring to FIG. 8, in operation (820), according to one embodiment, the electronic device may identify or check whether each of the attributes indicating the style of the second text is greater than a corresponding minimum value. If at least one of the attributes indicating the style of the second text is greater than the minimum value determined based on operation (810) (820—Yes), the electronic device may perform operation (830). If all of the attributes indicating the style of the second text are equal to or less than the minimum values of operation (810) (820—No), the electronic device may perform operation (860).
도 8을 참고하면, 동작(830) 내에서, 일 실시예에 따른, 전자 장치는, 제2 텍스트의 스타일을 나타내는 속성들 중 적어도 하나를 감소할 수 있다. 예를 들어, 전자 장치는, 제2 텍스트의 적어도 일부분의 라인 간격을 줄일 수 있다. 예를 들어, 전자 장치는, 제2 텍스트의 적어도 일부분의 폰트 사이즈를 줄일 수 있다. 예를 들어, 전자 장치는, 제2 텍스트의 적어도 일부분의 자간을 줄일 수 있다. 예를 들어, 전자 장치는, 폰트 사이즈, 라인 간격, 및 자간 중 적어도 하나를 줄여, 제2 텍스트의 스타일(또는 상기 스타일을 나타내는 속성 값)을 변경할 수 있다. 상기 예시된 속성들(예, 폰트 사이즈, 라인 간격, 및/또는 자간) 중 적어도 하나가 동작(830)에 기반하여 감소될 시, 제2 텍스트를 표시하기 위한 영역의 사이즈는 감소될 수 있다. Referring to FIG. 8, in operation (830), according to an embodiment, an electronic device may reduce at least one of the attributes indicating the style of the second text. For example, the electronic device may reduce the line spacing of at least a portion of the second text. For example, the electronic device may reduce the font size of at least a portion of the second text. For example, the electronic device may reduce the letter spacing of at least a portion of the second text. For example, the electronic device may change the style of the second text (or the attribute value indicating the style) by reducing at least one of the font size, line spacing, and letter spacing. When at least one of the above-described attributes (e.g., font size, line spacing, and/or letter spacing) is reduced based on operation (830), the size of the area for displaying the second text may be reduced.
도 8을 참고하면, 동작(840) 내에서, 일 실시예에 따른, 전자 장치는, 감소된 속성에 따라, 제2 텍스트가 표시될 영역의 사이즈가 제1 텍스트가 표시된 제1 영역(예, 도 7a의 제1 영역(710))의 사이즈 이하로 감소되었는지 여부를 식별할 수 있거나, 또는 결정할 수 있다. 예를 들어, 전자 장치는, 제2 텍스트가 표시될 영역이, 원문 영역 까지 감소되었는지 여부를 확인할 수 있다. 제2 텍스트가 표시될 영역의 사이즈가 제1 텍스트가 표시된 영역의 사이즈와 같거나, 또는 작은 경우(840-예), 전자 장치는 동작(850)을 수행할 수 있다. 제2 텍스트가 표시될 영역의 사이즈가 제1 텍스트가 표시된 영역의 사이즈 보다 큰 경우(840-아니오), 전자 장치는 동작(820)을 다시 수행할 수 있다. Referring to FIG. 8, in operation (840), according to one embodiment, the electronic device may identify or determine, based on the reduced property, whether the size of the area where the second text is to be displayed has been reduced to or smaller than the size of the first area where the first text is to be displayed (e.g., the first area (710) of FIG. 7A). For example, the electronic device may determine whether the area where the second text is to be displayed has been reduced to the original text area. If the size of the area where the second text is to be displayed is equal to or smaller than the size of the area where the first text is to be displayed (840—Yes), the electronic device may perform operation (850). If the size of the area where the second text is to be displayed is larger than the size of the area where the first text is to be displayed (840—No), the electronic device may perform operation (820) again.
동작들(820, 830, 840)을 참고하면, 제2 텍스트의 스타일을 나타내는 속성들 각각은, 대응하는 최소 값 보다 큰 범위 내에서 점진적으로 감소될 수 있다. 예를 들어, 전자 장치는 상기 속성들 중 적어도 하나를, 지정된 간격 및/또는 지정된 횟수에 기반하여 점진적으로 줄일 수 있다. 폰트 사이즈, 라인 간격, 및/또는 자간 중 적어도 두 속성들을 줄이는 경우, 전자 장치는, 지정된 순서에 따라 적어도 두 속성들 중 어느 한 속성을 우선적으로 줄일 수 있다. 예를 들어, 전자 장치는 라인 간격을, 최소 라인 간격 이상의 범위 내에서, 점진적으로 줄일 수 있다. 라인 간격이 최소 라인 간격까지 줄어든 이후에도, 제2 텍스트가 표시될 영역의 사이즈가 제1 텍스트가 표시된 제1 영역의 사이즈 보다 큰 경우, 전자 장치는 폰트 사이즈를 줄일 수 있다. 상기 예시 내에서, 전자 장치는, 폰트 사이즈를, 최소 폰트 사이즈 이상의 범위 내에서, 점진적으로 줄일 수 있다. 상기 예시 내에서, 폰트 사이즈가 최소 폰트 사이즈까지 줄어든 이후에도, 제2 텍스트가 표시될 영역의 사이즈가, 제1 텍스트가 표시된 제1 영역의 사이즈 보다 큰 경우, 전자 장치는 자간을 줄일 수 있다. 상기 예시 내에서, 전자 장치는, 자간을, 최소 자간 이상의 범위 내에서, 점진적으로 줄일 수 있다. Referring to operations (820, 830, 840), each of the properties indicating the style of the second text may be gradually reduced within a range greater than the corresponding minimum value. For example, the electronic device may gradually reduce at least one of the properties based on a specified interval and/or a specified number of times. When reducing at least two properties among the font size, line spacing, and/or kerning, the electronic device may preferentially reduce one of the at least two properties in a specified order. For example, the electronic device may gradually reduce the line spacing within a range greater than or equal to the minimum line spacing. Even after the line spacing is reduced to the minimum line spacing, if the size of the area where the second text is to be displayed is larger than the size of the first area where the first text is displayed, the electronic device may reduce the font size. In the above example, the electronic device may gradually reduce the font size within a range greater than or equal to the minimum font size. In the above example, even after the font size is reduced to the minimum font size, if the size of the area where the second text is to be displayed is larger than the size of the first area where the first text is displayed, the electronic device may reduce the letter spacing. In the above example, the electronic device may gradually reduce the letter spacing within a range greater than the minimum letter spacing.
실시예가 이에 제한되는 것은 아니며, 전자 장치는 폰트 사이즈를 상기 최소 폰트 사이즈 까지 먼저 줄인 다음, 라인 간격을 줄일 수 있다. 실시예가 이에 제한되는 것은 아니며, 단일 라인의 제2 텍스트의 속성들을 조절하는 경우, 라인 간격은 제2 텍스트를 표시하기 위한 영역의 사이즈에 영향을 미치지 않기 때문에, 전자 장치는 폰트 사이즈 및/또는 자간 중 적어도 하나 만을 조절할 수 있고, 라인 간격을 조절하지 않을 수 있다. The embodiment is not limited thereto, and the electronic device may first reduce the font size to the minimum font size and then reduce the line spacing. The embodiment is not limited thereto, and when adjusting the properties of the second text of a single line, the line spacing does not affect the size of the area for displaying the second text, so the electronic device may only adjust at least one of the font size and/or the letter spacing, and may not adjust the line spacing.
도 8을 참고하면, 동작(850) 내에서, 일 실시예에 따른, 전자 장치는, 감소된 속성에 기반하여, 제2 텍스트가 표시될 전자 문서 내 영역을 결정할 수 있다. 동작들(840, 850)을 참고하면, 제2 텍스트가 표시될 영역이, 원문 영역의 사이즈까지 감소된 경우, 전자 장치는 원문 영역을 통하여, 제2 텍스트를 표시할 수 있다. 예를 들어, 전자 장치는, 동작들(820, 830, 840)에 기반하여 조절된 스타일을 가지는, 제2 텍스트를, 동작(840)의 제1 영역 내에 표시할 수 있다. 예를 들어, 전자 장치는 제2 텍스트를, 제1 영역의 시작 위치로부터 표시할 수 있다. Referring to FIG. 8, in operation (850), according to one embodiment, the electronic device may determine an area within the electronic document where the second text is to be displayed based on the reduced properties. Referring to operations (840, 850), if the area where the second text is to be displayed is reduced to the size of the original text area, the electronic device may display the second text through the original text area. For example, the electronic device may display the second text, having an adjusted style based on operations (820, 830, 840), within the first area of operation (840). For example, the electronic device may display the second text from the start position of the first area.
도 8을 참고하면, 동작(860) 내에서, 일 실시예에 따른, 전자 장치는, 제2 텍스트의 스타일을 변경하여, 제2 텍스트를 제1 영역에 표시할 수 없는 것으로 결정할 수 있다. 예를 들어, 동작(810)의 모든 속성들이 최소 값들 까지 감소되었음에도 불구하고, 제2 텍스트가 표시될 영역의 사이즈가, 동작(840)의 제1 영역의 사이즈 보다 큰 경우, 전자 장치는 동작(860)을 수행할 수 있다. 동작(860)을 수행하는 전자 장치는, 도 8에 도시된 방식(예, 도 3을 참고하여 설명된, 제2 방식)과 상이한 방식(예, 도 3을 참고하여 설명된, 제2 방식, 및/또는 제3 방식)을 수행할 수 있다. Referring to FIG. 8, in operation (860), according to one embodiment, the electronic device may determine that the second text cannot be displayed in the first area by changing the style of the second text. For example, even though all properties of operation (810) have been reduced to minimum values, if the size of the area where the second text is to be displayed is larger than the size of the first area of operation (840), the electronic device may perform operation (860). The electronic device performing operation (860) may perform a different method (e.g., the second method described with reference to FIG. 3) than the method illustrated in FIG. 8 (e.g., the second method described with reference to FIG. 3) and/or the third method described with reference to FIG.
이하에서는, 도 9 및/또는 도 10을 참고하여, 도 10의 동작들을 수행하여 제2 텍스트에 대응하는 전자 문서 내 영역을 결정하는 전자 장치의 예시적인 동작이 설명된다. Hereinafter, with reference to FIG. 9 and/or FIG. 10, exemplary operations of an electronic device for determining an area within an electronic document corresponding to a second text by performing the operations of FIG. 10 are described.
도 9는, 전자 문서(900)의 예시적인 텍스트의 스타일을 변경하는 전자 장치의 예시적인 동작을 도시한다. 도 1 내지 도 2의 전자 장치(101)는, 도 8을 참고하여 설명되는 동작을 수행할 수 있다. 예를 들어, 도 2의 전자 장치(101) 및/또는 프로세서(210)는 도 9를 참고하여 설명되는 동작을 수행할 수 있다. 도 9의 동작은, 도 3의 동작(360), 도 5의 동작(530), 및/또는 도 8의 동작들과 관련될 수 있다. FIG. 9 illustrates an exemplary operation of an electronic device for changing the style of exemplary text of an electronic document (900). The electronic device (101) of FIGS. 1 and 2 may perform the operation described with reference to FIG. 8. For example, the electronic device (101) and/or the processor (210) of FIG. 2 may perform the operation described with reference to FIG. 9. The operation of FIG. 9 may be related to operation (360) of FIG. 3, operation (530) of FIG. 5, and/or operations of FIG. 8.
도 9를 참고하면, 예시적인 전자 문서(900)의 텍스트들(예, 제1 텍스트(911), 제2 텍스트(912), 및 제3 텍스트(913))을 번역하는 전자 장치의 일 실시예가 설명된다. 제1 텍스트(911)("전원 켜기/끄기")의 제1 폰트 사이즈가, 제2 텍스트(912)("제품 다시 시작하기")의 제2 폰트 사이즈보다 크고, 제3 텍스트(913)("제품을 다시 시작하려면 전원 버튼을 길게 누른 후 다시 시작을 누르세요. 제품이 동작하지 않고 아무 반응이 없으면, 전원 버튼과 음량(하) 버튼을 동시에 7 초 이상 길게 눌러 다시 시작하세요.")의 제3 폰트 사이즈가, 상기 제2 폰트 사이즈 보다 작은 것으로 가정한다. 또한, 제4 텍스트("전원 버튼을 몇 초간 길게 눌러 제품의 전원을 켜세요.")의 제4 폰트 사이즈가, 상기 제3 폰트 사이즈 보다 크고, 상기 제2 폰트 사이즈 보다 작은 것으로 가정한다. 예를 들어, 폰트 사이즈들의 순서는, 제1 폰트 사이즈, 제2 폰트 사이즈, 제4 폰트 사이즈, 및 제3 폰트 사이즈의 순서로 감소될 수 있다. Referring to FIG. 9, an embodiment of an electronic device that translates texts (e.g., first text (911), second text (912), and third text (913)) of an exemplary electronic document (900) is described. It is assumed that a first font size of the first text (911) (“Power On/Off”) is larger than a second font size of the second text (912) (“Restart the Product”), and a third font size of the third text (913) (“To restart the product, press and hold the power button and then press Restart. If the product is frozen and unresponsive, press and hold the power button and the volume down button simultaneously for more than 7 seconds to restart it”) is smaller than the second font size. It is also assumed that a fourth font size of the fourth text (“Press and hold the power button for several seconds to turn the product on”) is larger than the third font size and smaller than the second font size. For example, the order of font sizes may be reduced to a first font size, a second font size, a fourth font size, and a third font size.
도 9의 전자 문서(900)를 번역하여, 전자 장치는, 제1 텍스트(911)로부터 번역된 제5 텍스트(921)("Turning the device on and off"), 제2 텍스트(912)로부터 번역된 제6 텍스트(922)("Restarting the device."), 제3 텍스트(913)로부터 번역된 제7 텍스트(923)("To restart the device, press and hold the Power key, and then tap Restart. If your device is frozen and unresponsive, press and hold the Power key and the Volume Down key simultaneously for more than 7 seconds to restart it."), 및 제4 텍스트(914)로부터 번역된 제8 텍스트(924)("Press hold the Power key for a few seconds to turn on the device.")를 획득할 수 있다. 도 3을 참고하여 상술한 바와 같이, 전자 장치는 텍스트들(921, 922, 923, 924) 각각의 스타일들을, 텍스트들(911, 912, 913, 914)의 스타일들 각각으로 설정할 수 있고, 설정된 스타일들에 기반하는 텍스트들(921, 922, 923, 924)의 레이아웃을 이용하여, 텍스트들(921, 922, 923, 924)의 스타일들을 변경할 수 있다. By translating the electronic document (900) of FIG. 9, the electronic device can obtain the fifth text (921) translated from the first text (911) (“Turning the device on and off”), the sixth text (922) translated from the second text (912) (“Restarting the device.”), the seventh text (923) translated from the third text (913) (“To restart the device, press and hold the Power key, and then tap Restart. If your device is frozen and unresponsive, press and hold the Power key and the Volume Down key simultaneously for more than 7 seconds to restart it.”), and the eighth text (924) translated from the fourth text (914) (“Press hold the Power key for a few seconds to turn on the device.”). As described above with reference to FIG. 3, the electronic device can set the styles of each of the texts (921, 922, 923, 924) to the styles of each of the texts (911, 912, 913, 914), and can change the styles of the texts (921, 922, 923, 924) using the layout of the texts (921, 922, 923, 924) based on the set styles.
이하에서는, 텍스트들(911, 912, 913, 914)을 번역하여 텍스트들(921, 922, 923, 924)을 획득한 상태에서, 제2 방식을 이용하여 텍스트들(921, 922, 923, 924)이 표시될 전자 문서의 영역들을 결정하는 전자 장치의 예시적인 동작이 설명된다. 설명의 편의를 위하여, 텍스트들(921, 922, 923, 924)이 표시될 영역들의 사이즈들이, 텍스트들(911, 912, 913, 914)이 표시될 영역들의 사이즈들 보다 큰 것으로 가정한다. Hereinafter, an exemplary operation of an electronic device is described for determining areas of an electronic document where texts (921, 922, 923, 924) are to be displayed using the second method, after translating texts (911, 912, 913, 914) to obtain texts (921, 922, 923, 924). For convenience of explanation, it is assumed that the sizes of the areas where texts (921, 922, 923, 924) are to be displayed are larger than the sizes of the areas where texts (911, 912, 913, 914) are to be displayed.
일 실시예에 따른, 전자 장치는, 제5 텍스트(921)의 폰트 사이즈를 줄이는 경우, 제5 텍스트(921) 보다 작은 폰트 사이즈를 가지는 다른 텍스트들(예, 제6 텍스트(922), 및 제7 텍스트(923))의 폰트 사이즈 보다 큰 범위 내에서, 제5 텍스트(921)의 폰트 사이즈를 줄일 수 있다. 예를 들어, 전자 장치는, 제6 텍스트(922)의 폰트 사이즈(예, 제2 폰트 사이즈)를 초과하는 범위 내에서, 제5 텍스트(921)의 폰트 사이즈를 줄일 수 있다. 유사하게, 전자 장치는, 제7 텍스트(923)의 폰트 사이즈(예, 제3 폰트 사이즈)를 초과하는 범위 내에서, 제6 텍스트(922)의 폰트 사이즈를 줄일 수 있다. 상기 예시에서, 전자 문서(900)를 통해 표시되는 제5 텍스트(921)의 폰트 사이즈는, 제6 텍스트(922)의 폰트 사이즈 보다 크고, 제6 텍스트(922)의 폰트 사이즈는, 제7 텍스트(923)의 폰트 사이즈 보다 크다. In one embodiment, when reducing the font size of the fifth text (921), the electronic device may reduce the font size of the fifth text (921) within a range greater than the font sizes of other texts (e.g., the sixth text (922) and the seventh text (923)) having a smaller font size than the fifth text (921). For example, the electronic device may reduce the font size of the fifth text (921) within a range exceeding the font size of the sixth text (922) (e.g., the second font size). Similarly, the electronic device may reduce the font size of the sixth text (922) within a range exceeding the font size of the seventh text (923) (e.g., the third font size). In the above example, the font size of the fifth text (921) displayed through the electronic document (900) is larger than the font size of the sixth text (922), and the font size of the sixth text (922) is larger than the font size of the seventh text (923).
예를 들어, 제4 텍스트(914)의 속성(예, 폰트 사이즈, 폰트 네임, 및/또는 자간)을 이용하여, 제4 텍스트(914)로부터 번역된 제8 텍스트("Press and hold the Power key for a few seconds to turn on the device.")가 표시될 전자 문서(900) 내 영역(919)의 사이즈를 계산할 수 있다. 도 9를 참고하면, 제8 텍스트가 제4 텍스트(914)의 속성을 가지는 경우, 제8 텍스트가 표시될 영역(919)은, 전자 문서(900)의 공백 영역을 초과할 수 있다. 예를 들어, 제8 텍스트가 표시될 영역(919)의 적어도 일부분이, 전자 문서(900)의 가상 페이지의 밖에 위치될 수 있다. 예를 들어, 제4 텍스트(914)가 위치된 전자 문서(900)의 부분 내에서, 공백 영역을 이용하여 제4 텍스트(914)의 속성을 가지는 제8 텍스트를 표시하는 것이 불가능할 수 있다. 전자 장치는, 제4 텍스트(914)의 전자 문서(900) 내의 영역의 사이즈를 초과하는, 영역(919)을 식별하거나, 또는 영역(919)이 전자 문서(900) 및/또는 공백 영역 보다 큰 경우, 제8 텍스트의 속성을 조절할 수 있다. For example, the size of an area (919) within the electronic document (900) where the eighth text (“Press and hold the Power key for a few seconds to turn on the device.”) translated from the fourth text (914) is to be displayed can be calculated using the properties of the fourth text (914) (e.g., font size, font name, and/or kerning). Referring to FIG. 9, if the eighth text has the properties of the fourth text (914), the area (919) where the eighth text is to be displayed may exceed the blank area of the electronic document (900). For example, at least a portion of the area (919) where the eighth text is to be displayed may be located outside the virtual page of the electronic document (900). For example, it may be impossible to display the eighth text having the properties of the fourth text (914) using the blank area within the portion of the electronic document (900) where the fourth text (914) is located. The electronic device may identify an area (919) that exceeds the size of the area within the electronic document (900) of the fourth text (914), or adjust an attribute of the eighth text if the area (919) is larger than the electronic document (900) and/or the blank area.
예를 들어, 전자 장치는 제8 텍스트의 폰트 사이즈, 폰트 네임, 및/또는 자간을 조절하여, 제8 텍스트가 표시될 영역의 사이즈를, 영역(919) 미만으로 줄일 수 있다. 도 9를 참고하면, 제4 텍스트의 폰트 사이즈 미만의 폰트 사이즈, 및 제4 텍스트의 자간 미만의 자간을 가지는 제8 텍스트(924)를 표시하는 일 실시예가 도시된다. 전자 장치는, 제8 텍스트(924)의 폰트 사이즈를, 제7 텍스트(923)의 폰트 사이즈를 초과하는 범위 내에서, 줄일 수 있다. 전자 장치는, 제8 텍스트(924)의 자간을, 제7 텍스트(923)의 자간을 초과하는 범위 내에서 줄일 수 있다. For example, the electronic device can adjust the font size, font name, and/or kerning of the eighth text to reduce the size of the area where the eighth text is to be displayed to less than the area (919). Referring to FIG. 9, an embodiment of displaying the eighth text (924) having a font size less than the font size of the fourth text and kerning less than the kerning of the fourth text is illustrated. The electronic device can reduce the font size of the eighth text (924) within a range exceeding the font size of the seventh text (923). The electronic device can reduce the kerning of the eighth text (924) within a range exceeding the kerning of the seventh text (923).
상술한 바와 같이, 일 실시예에 따른, 전자 장치는, 번역된 텍스트들의 폰트 사이즈들을 변경할 시, 상기 텍스트들 사이의 폰트 사이즈들의 순서가 유지되게 만들 수 있다. 폰트 사이즈들의 순서는, 전자 문서 내에서 상기 텍스트들의 위치들(예, 제목, 부제목, 및/또는 본문)을 나타낼 수 있다. 전자 장치는 폰트 사이즈들의 순서를 유지하면서, 텍스트들의 폰트 사이즈들을 줄여, 텍스트들이, 전자 문서의 다른 콘텐트와 중첩되지 않으면서, 상기 텍스트들의 위치들이 직관적으로 인식되게 만들 수 있다. As described above, according to one embodiment, the electronic device can maintain the order of font sizes among the texts when changing the font sizes of the translated texts. The order of the font sizes can indicate the positions of the texts (e.g., title, subtitle, and/or body) within the electronic document. The electronic device can reduce the font sizes of the texts while maintaining the order of the font sizes, so that the positions of the texts can be intuitively recognized without the texts overlapping with other content of the electronic document.
도 10은, 텍스트에 인접한, 전자 문서의 다른 콘텐트에 기반하는 전자 장치의 예시적인 동작을 도시한다. 도 1 내지 도 2의 전자 장치(101)는 도 10을 참고하여 설명되는 동작을 수행할 수 있다. 예를 들어, 도 2의 전자 장치(101) 및/또는 프로세서(210)는 도 10을 참고하여 설명되는 동작을 수행할 수 있다. FIG. 10 illustrates exemplary operations of an electronic device based on other content of an electronic document adjacent to text. The electronic device (101) of FIGS. 1 and 2 can perform the operations described with reference to FIG. 10 . For example, the electronic device (101) and/or the processor (210) of FIG. 2 can perform the operations described with reference to FIG. 10 .
도 10을 참고하면, 텍스트 박스(예, 테이블의 셀)에 포함된, 제1 언어(예, 한국어)의 제1 텍스트("서명 및 날인")를 번역하는 전자 장치의 일 실시예가 설명된다. 상태(1011)를 참고하면, 전자 문서의 텍스트 박스 내에서, 20의 폰트 사이즈를 가지는 제1 텍스트가 표시될 수 있다. 상태(1011) 내에서, 상기 제1 텍스트를 번역하기 위한 입력을 수신한 전자 장치는, 상기 제1 텍스트로부터 번역된, 제2 언어(예, 영어)의 제2 텍스트("signature and seal")를 획득할 수 있다. Referring to FIG. 10, an embodiment of an electronic device that translates a first text (“signature and seal”) in a first language (e.g., Korean) contained in a text box (e.g., a cell of a table) is described. Referring to state (1011), a first text having a font size of 20 may be displayed within a text box of an electronic document. Within state (1011), an electronic device that receives an input for translating the first text may obtain a second text (“signature and seal”) in a second language (e.g., English) translated from the first text.
제2 텍스트를, 제1 텍스트의 폰트 사이즈(예, 20)로 표시할 시, 제2 텍스트를 표시하기 위한 영역의 사이즈가 제1 텍스트를 표시하기 위한 제1 영역의 사이즈를 초과할 수 있다. 제1 영역의 사이즈를 초과하는, 상기 영역의 사이즈를 식별한 전자 장치는, 제2 텍스트의 속성(예, 폰트 사이즈)을 줄여, 제2 텍스트가 상기 제1 영역에 포함되게 만들 수 있다. 도 10의 예시적인 상태(1012)를 참고하면, 폰트 사이즈가 16 까지 감소되는 경우, 제2 텍스트가 제1 영역에 포함될 수 있다. When displaying the second text with the font size of the first text (e.g., 20), the size of the area for displaying the second text may exceed the size of the first area for displaying the first text. An electronic device that identifies the size of the area exceeding the size of the first area may reduce the properties of the second text (e.g., font size) so that the second text is included in the first area. Referring to an exemplary state (1012) of FIG. 10, when the font size is reduced to 16, the second text may be included in the first area.
만약, 제1 텍스트가 위치된 텍스트 박스에 인접한 다른 텍스트 박스(예, 제1 텍스트를 포함하는 테이블 내에서, 제1 텍스트의 셀에 인접한 다른 셀)가 식별된 경우, 전자 장치는 상기 다른 텍스트 박스에 위치된 다른 텍스트의 폰트 사이즈를 이용하여, 상기 제2 텍스트의 폰트 사이즈를 변경할 수 있다. 예를 들어, 다른 텍스트가, 16을 초과하는 폰트 사이즈를 가지는 경우, 전자 장치는, 16을 초과하는 범위 내에서, 제2 텍스트의 폰트 사이즈를 줄일 수 있다. 상기 범위 내에서, 제2 텍스트 전체를 텍스트 박스를 통해 표시할 수 없는 경우, 전자 장치는 도 10의 상태(1013)와 같이, 제2 텍스트 중 일부분을 생략할 수 있다. 도 10의 상태(1013)를 참고하면, 전자 장치는 18의 폰트 사이즈를 가지는 제2 텍스트를 표시하는 동안, 텍스트 박스 외부에 위치되는 제2 텍스트의 일부분(예, "signature and seal"의 "al")의 생략을 나타내는 지정된 문자("...")를, 제2 텍스트의 나머지 부분과 함께 표시할 수 있다. 상태(1013) 내에서, 전자 장치는 상기 지정된 문자와 관련된 입력(예, 지정된 문자에 대한 마우스 클릭, 및/또는 탭 제스쳐)에 기반하여, 제2 텍스트 전체를 표시할 수 있다(예, 팝업 윈도우 및/또는 토스트(toast)). If another text box adjacent to the text box in which the first text is located (e.g., another cell adjacent to the cell of the first text in a table including the first text) is identified, the electronic device may change the font size of the second text using the font size of the other text located in the other text box. For example, if the other text has a font size exceeding 16, the electronic device may reduce the font size of the second text within a range exceeding 16. If the entire second text cannot be displayed through the text box within the range, the electronic device may omit a portion of the second text, as in state (1013) of FIG. 10. Referring to state (1013) of FIG. 10, while the electronic device displays the second text having a font size of 18, the electronic device may display a designated character (“…”) indicating omission of a portion of the second text located outside the text box (e.g., “al” of “signature and seal”), together with the remainder of the second text. Within state (1013), the electronic device may display the entire second text (e.g., a pop-up window and/or a toast) based on input associated with the specified character (e.g., a mouse click on the specified character, and/or a tap gesture).
이하에서는, 도 11을 참고하여, 제2 텍스트와 다른 콘텐트를 변경하여, 제2 텍스트를 표시하기 위한 전자 문서 내 영역을 생성하는 전자 장치의 예시적인 동작이 설명된다. Hereinafter, with reference to FIG. 11, an exemplary operation of an electronic device for creating an area within an electronic document for displaying a second text by changing content other than the second text is described.
도 11은, 텍스트를 포함하는 페이지의 콘텐트를 적어도 부분적으로 변경하는 전자 장치의 동작에 대한 흐름도를 도시한다. 도 1 내지 도 2의 전자 장치(101)는, 도 11을 참고하여 설명되는 동작을 수행할 수 있다. 예를 들어, 도 2의 전자 장치(101) 및/또는 프로세서(210)는 도 11을 참고하여 설명되는 동작을 수행할 수 있다. 도 11의 동작들은, 도 3의 동작(360), 및/또는 도 5의 동작(550)과 관련될 수 있다. 도 11의 동작들의 순서는 예시적인 것으로 실시예가 이에 제한되는 것은 아니다. 예를 들어, 전자 장치는 도 11의 동작들을, 도 11의 순서와 상이한 순서로 수행할 수 있다. 예를 들어, 전자 장치는 도 11의 동작들 중 적어도 두 동작들을 실질적으로 동시에 수행할 수 있다. FIG. 11 illustrates a flowchart of operations of an electronic device for at least partially modifying the content of a page including text. The electronic device (101) of FIGS. 1 and 2 may perform the operations described with reference to FIG. 11. For example, the electronic device (101) and/or the processor (210) of FIG. 2 may perform the operations described with reference to FIG. 11. The operations of FIG. 11 may be related to operation (360) of FIG. 3 and/or operation (550) of FIG. 5. The order of the operations of FIG. 11 is exemplary and the embodiment is not limited thereto. For example, the electronic device may perform the operations of FIG. 11 in a different order than the order of FIG. 11. For example, the electronic device may perform at least two of the operations of FIG. 11 substantially simultaneously.
도 11을 참고하면, 동작(1110) 내에서, 일 실시예에 따른, 전자 장치는, 제1 영역에 표시되는 제1 텍스트(예, 도 1의 제1 텍스트(131), 및/또는 도 4의 제1 텍스트(410))를 번역하여, 제2 텍스트(예, 도 1의 제2 텍스트(151), 및/또는 도 4의 제2 텍스트(460))를 획득할 수 있다. 전자 장치는, 제1 텍스트를 번역하기 위한 입력(예, 도 3의 동작(310)의 입력)에 응답하여, 동작(1110)을 수행할 수 있다. 상기 제2 텍스트와 함께, 전자 장치는 제2 텍스트의 스타일을 나타내는 정보(예, 태그)를 획득할 수 있다. 도 3의 동작(350)을 참고하여 상술한 바와 같이, 전자 장치는, 제2 텍스트가 표시될 전자 문서의 제2 영역의 사이즈가, 상기 제1 영역의 사이즈 보다 큰 경우, 도 11의 동작들(1120, 1130, 1140) 중 적어도 하나를 수행할 수 있다. Referring to FIG. 11, in operation (1110), according to one embodiment, an electronic device may translate a first text displayed in a first area (e.g., the first text (131) of FIG. 1 and/or the first text (410) of FIG. 4) to obtain a second text (e.g., the second text (151) of FIG. 1 and/or the second text (460) of FIG. 4). The electronic device may perform operation (1110) in response to an input for translating the first text (e.g., an input of operation (310) of FIG. 3). Together with the second text, the electronic device may obtain information (e.g., a tag) indicating a style of the second text. As described above with reference to operation (350) of FIG. 3, the electronic device may perform at least one of operations (1120, 1130, 1140) of FIG. 11 when the size of the second area of the electronic document in which the second text is to be displayed is larger than the size of the first area.
도 11을 참고하면, 동작(1120) 내에서, 일 실시예에 따른, 전자 장치는, 제2 텍스트가 표시될 전자 문서의 제2 영역 내에 적어도 부분적으로 표시되는, 전자 문서의 다른 오브젝트를 식별할 수 있다. 제2 텍스트가 제1 텍스트를 대체하여 표시되기 때문에, 동작(1110)의 제1 영역 보다 큰 상기 제2 영역은, 상기 제1 영역을 포함할 수 있다. 전자 장치는 전자 문서 내에서 상기 제1 영역에 인접한 다른 오브젝트를 식별할 수 있다. Referring to FIG. 11, in operation (1120), according to one embodiment, an electronic device may identify another object of an electronic document that is at least partially displayed within a second area of the electronic document where second text is to be displayed. Since the second text is displayed in place of the first text, the second area, which is larger than the first area of operation (1110), may include the first area. The electronic device may identify another object adjacent to the first area within the electronic document.
도 11을 참고하면, 동작(1130) 내에서, 일 실시예에 따른, 전자 장치는, 동작(1120)의 다른 오브젝트가 제2 영역 밖에 표시되도록, 다른 오브젝트를 이동할 수 있다. 예를 들어, 전자 문서 내에서, 동작(1120)의 다른 오브젝트 및 제2 영역(또는 상기 제1 영역) 사이의 거리가 증가되도록, 전자 장치는 상기 다른 오브젝트를 이동할 수 있다. 다른 오브젝트가 또 다른 오브젝트와 중첩되지 않도록, 전자 장치는 제2 영역과 중첩되는 상기 다른 오브젝트, 및 상기 다른 오브젝트 너머의 또 다른 오브젝트를, 페이지(예, 제2 텍스트가 위치될 가상 페이지) 내에서 일체로 이동할 수 있다. Referring to FIG. 11, in operation (1130), according to one embodiment, the electronic device may move another object so that another object of operation (1120) is displayed outside the second area. For example, within an electronic document, the electronic device may move the other object so that the distance between the other object of operation (1120) and the second area (or the first area) increases. To prevent the other object from overlapping another object, the electronic device may move the other object overlapping the second area and another object beyond the other object as a whole within a page (e.g., a virtual page where the second text will be located).
도 11을 참고하면, 동작(1140) 내에서, 일 실시예에 따른, 전자 장치는, 다른 오브젝트의 적어도 일부분이, 전자 문서의 페이지의 밖으로 이동하였는지 여부에 기반하여, 페이지의 사이즈를 증가하거나, 전자 문서 내에 페이지를 추가할 수 있다. 예를 들어, 동작(1130)의 이동에 의해, 다른 오브젝트가 페이지 밖으로 이동하는 경우, 전자 장치는 전자 문서 내에서 페이지를 추가할 수 있다. 예를 들어, 전자 장치는, 제2 텍스트가 위치될 페이지 이후에, 페이지를 추가할 수 있다. 추가된 페이지로, 전자 장치는 페이지 밖으로 이동된, 상기 다른 오브젝트를 이동할 수 있다. 예를 들어, 제2 텍스트가 위치될 페이지 내에서, 상기 다른 오브젝트가 완전히 제거될 수 있다. 실시예가 이에 제한되는 것은 아니며, 전자 장치는, 제2 텍스트가 위치될 페이지의 너비, 또는 높이 중 적어도 하나를 증가하여, 상기 다른 오브젝트가 상기 페이지 내에 포함되게 만들 수 있다. Referring to FIG. 11, in operation (1140), according to an embodiment, the electronic device may increase the size of a page or add a page within the electronic document based on whether at least a portion of another object has moved out of the page of the electronic document. For example, if another object has moved out of the page due to the movement in operation (1130), the electronic device may add a page within the electronic document. For example, the electronic device may add a page after the page where the second text is to be located. With the added page, the electronic device may move the other object that has moved out of the page. For example, the other object may be completely removed from the page where the second text is to be located. The embodiment is not limited thereto, and the electronic device may increase at least one of the width or the height of the page where the second text is to be located, so that the other object is included within the page.
상술한 바와 같이, 전자 장치는, 제2 텍스트와 상이한 전자 문서의 다른 콘텐트를 이동하여, 제2 텍스트가 상기 다른 콘텐트와 중첩되지 않게 만들 수 있다. 상기 이동에 기반하여, 전자 장치는, 제2 텍스트의 폰트 사이즈(및/또는 스타일)를 유지하면서, 제2 텍스트가 상기 다른 콘텐트와 중첩되지 않게 만들 수 있다. As described above, the electronic device can move other content of the electronic document that is different from the second text so that the second text does not overlap with the other content. Based on the movement, the electronic device can make the second text not overlap with the other content while maintaining the font size (and/or style) of the second text.
이하에서는, 도 12를 참고하여, 도 11을 참고하여 설명된 제3 방식에 따라, 전자 문서에 제2 텍스트를 추가하는 전자 장치의 예시적인 동작이 설명된다. Hereinafter, with reference to FIG. 12, an exemplary operation of an electronic device for adding a second text to an electronic document according to the third method described with reference to FIG. 11 is described.
도 12는, 텍스트를 포함하는 페이지의 콘텐트를 적어도 부분적으로 변경하는 전자 장치의 예시적인 동작을 도시한다. 도 1 내지 도 2의 전자 장치(101)는 도 12를 참고하여 설명되는 동작을 수행할 수 있다. 예를 들어, 도 2의 전자 장치(101) 및/또는 프로세서(210)는 도 12를 참고하여 설명되는 동작을 수행할 수 있다. 도 12를 참고하여 설명되는 동작은, 도 3의 동작(360), 도 5의 동작(550), 및/또는 도 11의 동작들과 관련될 수 있다. FIG. 12 illustrates an exemplary operation of an electronic device that at least partially modifies the content of a page including text. The electronic device (101) of FIGS. 1 and 2 may perform the operation described with reference to FIG. 12 . For example, the electronic device (101) and/or the processor (210) of FIG. 2 may perform the operation described with reference to FIG. 12 . The operation described with reference to FIG. 12 may be related to operation (360) of FIG. 3 , operation (550) of FIG. 5 , and/or operations of FIG. 11 .
도 12를 참고하면, 예시적인 전자 문서(1200)의 텍스트들(예, 제1 텍스트(1211), 제2 텍스트(1212), 및 제3 텍스트(1213))을 번역하는 전자 장치의 일 실시예가 설명된다. 제1 텍스트(1211)("전원 켜기/끄기"), 및 제3 텍스트(1213)("제품 다시 시작하기") 사이의 영역(예, 높이 h1을 가지는 영역) 내에, 제2 텍스트(1212)("전원 버튼을 몇 초간 길게 눌러 제품의 전원을 켜세요. 비행기, 병원 등 무선 기기 사용이 제한된 곳에서는 해당 구역 담당자가 명시한 경고와 지시 사항을 모두 따르세요.")가 위치된 것으로 가정한다. Referring to FIG. 12, an embodiment of an electronic device that translates texts (e.g., first text (1211), second text (1212), and third text (1213)) of an exemplary electronic document (1200) is described. It is assumed that the second text (1212) (e.g., an area having a height h1) is positioned within an area between the first text (1211) ("Power On/Off") and the third text (1213) ("Restart the Product"). The second text (1212) ("Press and hold the power button for several seconds to power on the product. In areas where the use of wireless devices is restricted, such as airplanes and hospitals, follow all warnings and instructions provided by the person in charge of the area.") is positioned.
도 12의 전자 문서(1200)를 번역하여, 전자 장치는 제1 텍스트(1211)로부터 번역된 제4 텍스트(1221) ("Turning the device on and off"), 제2 텍스트(1212)로부터 번역된 제5 텍스트(1222)("Press and hold the Power key for a few seconds to turn on the device. Follow all posted warnings and directions from authorized personnel in areas where the use of wireless devices is restricted, such as airplanes and hospitals."), 및 제3 텍스트(1223)로부터 번역된 제6 텍스트(1223)("Restarting the device.")를 획득할 수 있다. 도 3을 참고하여 상술한 바와 같이, 텍스트들(1221, 1222, 1223) 각각은, 텍스트들(1211, 1212, 1213)의 스타일들(예, 폰트 사이즈)을 각각 가질 수 있다. By translating the electronic document (1200) of FIG. 12, the electronic device can obtain a fourth text (1221) translated from the first text (1211) (“Turning the device on and off”), a fifth text (1222) translated from the second text (1212) (“Press and hold the Power key for a few seconds to turn on the device. Follow all posted warnings and directions from authorized personnel in areas where the use of wireless devices is restricted, such as airplanes and hospitals.”), and a sixth text (1223) translated from the third text (1223) (“Restarting the device.”). As described above with reference to FIG. 3, each of the texts (1221, 1222, 1223) can have the styles (e.g., font size) of the texts (1211, 1212, 1213).
일 실시예에 따른, 전자 장치는, 텍스트들(1221, 1222, 1223)이 서로 중첩되는지 여부, 및/또는 텍스트들(1221, 1222, 1223)이 전자 문서(1200)의 다른 콘텐트와 중첩되는지 여부를 확인할 수 있다. 제5 텍스트(1222)가, 제2 텍스트(1212) 보다 많은 문자들을 포함하기 때문에, 제5 텍스트(1222)를 표시하기 위한 영역의 사이즈는, 제2 텍스트(1212)를 포함하는 영역(예, 높이 h1을 가지는 영역)의 사이즈 보다 클 수 있다. 예를 들어, 제5 텍스트(1222)를, 제2 텍스트(1212)가 표시되었던 위치에 표시할 시, 제5 텍스트(1222)가 다른 텍스트들(예, 제4 텍스트(1221) 및/또는 제6 텍스트(1223))과 중첩될 수 있다. In one embodiment, the electronic device can determine whether texts (1221, 1222, 1223) overlap each other and/or whether texts (1221, 1222, 1223) overlap with other content of the electronic document (1200). Since the fifth text (1222) includes more characters than the second text (1212), the size of the area for displaying the fifth text (1222) may be larger than the size of the area (e.g., the area having a height h1) that includes the second text (1212). For example, when displaying the fifth text (1222) at a location where the second text (1212) was displayed, the fifth text (1222) may overlap with other texts (e.g., the fourth text (1221) and/or the sixth text (1223)).
일 실시예에 따른, 전자 장치는, 제3 방식을 수행하여, 텍스트들(1221, 1222, 1223)이 서로 중첩되지 않게 만들 수 있다. 예를 들어, 전자 장치는, 제5 텍스트(1222)와 인접한 다른 콘텐트(예, 제6 텍스트(1223)를 포함하는, 제5 텍스트(1222) 아래에 위치된 콘텐트)를, 제5 텍스트(1222)와 반대인 방향으로 이동할 수 있다. 예를 들어, 전자 장치는 제5 텍스트(1222) 및 다른 콘텐트 사이의 거리가 증가되도록, 상기 다른 콘텐트를 이동할 수 있다. 도 12를 참고하면, 상기 다른 콘텐트의 이동에 기반하여, 제6 텍스트(1223) 및 제6 텍스트(1223) 아래의 콘텐트는, 전자 문서의 아래로 이동될 수 있다. 상기 이동에 기반하여, 제6 텍스트(1223) 및 제4 텍스트(1221) 사이의 거리가, h1을 초과하는 h2 까지 증가될 수 있다. In one embodiment, the electronic device may perform the third method to prevent the texts (1221, 1222, 1223) from overlapping each other. For example, the electronic device may move other content adjacent to the fifth text (1222) (e.g., content positioned below the fifth text (1222), including the sixth text (1223)) in a direction opposite to the fifth text (1222). For example, the electronic device may move the other content such that the distance between the fifth text (1222) and the other content increases. Referring to FIG. 12, based on the movement of the other content, the sixth text (1223) and the content below the sixth text (1223) may be moved to the bottom of the electronic document. Based on the movement, the distance between the sixth text (1223) and the fourth text (1221) may be increased to h2, which exceeds h1.
도 12를 참고하면, h2의 높이를 가지는 영역 내에, 전자 장치는 제5 텍스트(1222)를 표시할 수 있다. 제5 텍스트(1222)는, h1을 초과하는 높이 h2를 가지는 영역 내에 표시될 수 있고, 다른 텍스트(예, 제4 텍스트(1221) 및/또는 제6 텍스트(1223))와 중첩되지 않을 수 있다. Referring to FIG. 12, within an area having a height of h2, the electronic device may display a fifth text (1222). The fifth text (1222) may be displayed within an area having a height h2 exceeding h1, and may not overlap with other text (e.g., the fourth text (1221) and/or the sixth text (1223)).
상술한 바와 같이, 일 실시예에 따른, 전자 장치는, 제1 텍스트를 포함하는 전자 문서에 대하여, 상기 제1 텍스트를, 제2 텍스트로 번역할 수 있다. 제1 텍스트로부터 교체된, 상기 제2 텍스트를 포함하는, 전자 문서를 표시할 시, 전자 장치는, 상기 제2 텍스트 및 전자 문서의 다른 콘텐트 사이의 위치 관계를 이용하여, 전자 문서의 콘텐트의 배열을 변경할 수 있다. 예를 들어, 제2 텍스트가 다른 콘텐트와 중첩되는 경우, 전자 장치는, 전자 문서의 공백 영역을, 상기 제2 텍스트를 표시하기 위하여 이용할 수 있다. 예를 들어, 전자 장치는 제2 텍스트의 스타일을 조절하여, 제2 텍스트가, 제1 텍스트가 표시되었던 영역 내에 포함되게 만들 수 있다. 예를 들어, 전자 장치는, 제2 텍스트에 인접한 다른 콘텐트를, 전자 문서 내에서 쉬프트하여, 제2 텍스트가 표시될 영역을 만들 수 있다. As described above, according to one embodiment, an electronic device can translate a first text into a second text for an electronic document including the first text. When displaying an electronic document including the second text replaced with the first text, the electronic device can change the arrangement of the content of the electronic document by utilizing the positional relationship between the second text and other content of the electronic document. For example, if the second text overlaps other content, the electronic device can utilize a blank area of the electronic document to display the second text. For example, the electronic device can adjust the style of the second text so that the second text is included within the area where the first text was displayed. For example, the electronic device can shift other content adjacent to the second text within the electronic document to create an area where the second text will be displayed.
이하에서는, 도 13을 참고하여, 제1 텍스트로부터 번역된 제2 텍스트를 표시하는 전자 장치가, 상기 제1 텍스트를 포함하는 전자 문서를 다시 표시하는 예시적인 동작이 설명된다. Hereinafter, with reference to FIG. 13, an exemplary operation of an electronic device displaying a second text translated from a first text, in which an electronic document including the first text is re-displayed, is described.
도 13은, 사용자 입력에 따라, 번역 기능을 실행하기 이전에 표시되었던 전자 문서를 표시하는, 전자 장치의 예시적인 동작을 도시한다. 도 1 내지 도 2의 전자 장치(101)는, 도 13을 참고하여 설명되는 동작을 수행할 수 있다. 예를 들어, 도 2의 전자 장치(101) 및/또는 프로세서(210)는 도 13을 참고하여 설명되는 동작을 수행할 수 있다. 도 13의 동작들 중 적어도 하나는, 도 3의 동작(390), 도 5의 동작(560), 도 6의 동작(660), 도 8의 동작(850), 및 도 11의 동작(1140)에 기반하여 전자 문서를 적어도 부분적으로 표시하는 동안, 수행될 수 있다. 도 13의 동작들의 순서는 예시적인 것으로, 실시예가 이에 제한되는 것은 아니다. 예를 들어, 전자 장치는 도 13의 동작들을, 도 13에 도시된 순서와 다르게 수행할 수 있다. 예를 들어, 전자 장치는 도 13의 동작들 중 적어도 두 동작들을, 실질적으로 동시에 수행할 수 있다. FIG. 13 illustrates exemplary operations of an electronic device for displaying an electronic document that was displayed prior to executing a translation function, based on user input. The electronic device (101) of FIGS. 1 and 2 may perform the operations described with reference to FIG. 13 . For example, the electronic device (101) and/or the processor (210) of FIG. 2 may perform the operations described with reference to FIG. 13 . At least one of the operations of FIG. 13 may be performed while at least partially displaying the electronic document based on operation (390) of FIG. 3 , operation (560) of FIG. 5 , operation (660) of FIG. 6 , operation (850) of FIG. 8 , and operation (1140) of FIG. 11 . The order of the operations of FIG. 13 is exemplary, and the embodiment is not limited thereto. For example, the electronic device may perform the operations of FIG. 13 in a different order from the order illustrated in FIG. 13 . For example, the electronic device may perform at least two of the operations of FIG. 13 substantially simultaneously.
도 13을 참고하면, 동작(1310) 내에서, 일 실시예에 따른, 전자 장치는, 제1 언어의 제1 텍스트(예, 도 1의 제1 텍스트(131), 및/또는 도 4의 제1 텍스트(410))를 포함하는 전자 문서(700)를 표시할 수 있다. 도 13을 참고하면, 동작(1310)을 수행하는 전자 장치가 도 7a 내지 도 7b의 전자 문서(700)를 표시하는 예시적인 케이스가 도시된다. 전자 문서(700)는, 제1 영역(710)에 위치된, 제1 언어(예, 한국어)의 제1 텍스트를 포함할 수 있다. Referring to FIG. 13, in operation (1310), according to one embodiment, an electronic device may display an electronic document (700) including a first text in a first language (e.g., the first text (131) of FIG. 1 and/or the first text (410) of FIG. 4). Referring to FIG. 13, an exemplary case is illustrated in which an electronic device performing operation (1310) displays the electronic document (700) of FIGS. 7A and 7B. The electronic document (700) may include a first text in a first language (e.g., Korean) located in a first area (710).
도 13을 참고하면, 동작(1320) 내에서, 일 실시예에 따른, 전자 장치는, 제1 텍스트의 번역을 위한 제1 입력을 수신할 수 있다. 상기 제1 입력은, 동작(310)의 입력을 포함할 수 있다. 제1 입력을 수신한 전자 장치는, 번역 기능을 실행하여, 제1 텍스트에 대응하는 제2 텍스트를 획득할 수 있다. Referring to FIG. 13, in operation (1320), according to one embodiment, an electronic device may receive a first input for translating a first text. The first input may include the input of operation (310). The electronic device receiving the first input may execute a translation function to obtain a second text corresponding to the first text.
도 13을 참고하면, 동작(1330) 내에서, 일 실시예에 따른, 전자 장치는, 제1 텍스트로부터 번역된, 제2 언어의 제2 텍스트(예, 도 1의 제2 텍스트(151), 및/또는 도 4의 제2 텍스트(460))를 포함하는 전자 문서(700)를 표시할 수 있다. 전자 장치는, 도 1 내지 도 12를 참고하여 설명된 동작에 기반하여, 제2 텍스트를 포함하는 전자 문서(700)를 생성할 수 있거나, 또는 표시할 수 있다. 도 13을 참고하면, 동작(1330)을 수행하는 전자 장치는, 제1 영역(710) 보다 넓은 제2 영역(760)에서 제2 텍스트를 포함하는, 전자 문서(700)를 표시할 수 있다. Referring to FIG. 13, in operation (1330), according to one embodiment, an electronic device may display an electronic document (700) including a second text in a second language (e.g., the second text (151) of FIG. 1 and/or the second text (460) of FIG. 4) translated from a first text. The electronic device may generate or display the electronic document (700) including the second text based on the operations described with reference to FIGS. 1 to 12. Referring to FIG. 13, the electronic device performing operation (1330) may display the electronic document (700) including the second text in a second area (760) that is wider than the first area (710).
일 실시예에서, 동작(1330)의 제2 텍스트를 포함하는 전자 문서(700)를 표시하는 전자 장치는, 전자 문서(700) 내에서 원문에 대응하는 오브젝트(예, 동작(1310)의 제1 텍스트에 대응하는 오브젝트), 및 번역문에 대응하는 오브젝트(예, 동작(1330)의 제2 텍스트를 나타내는 오브젝트)를 관리할 수 있다. 예를 들어, 전자 장치는 원문을 나타내는 오브젝트들의 제1 세트, 및 번역문을 나타내는 오브젝트들의 제2 세트를 저장할 수 있다. 동작(1330)의 전자 문서는, 상기 제1 세트 및 상기 제2 세트 중에서, 상기 제2 세트에 포함된 오브젝트들을 렌더링하여, 표시될 수 있다. 예를 들어, 동작(1330)의 전자 문서를 표시하는 상태는, 제2 세트에 포함된 오브젝트들을 렌더링하는 상태로 설명될 수 있다. In one embodiment, an electronic device displaying an electronic document (700) including a second text of an operation (1330) can manage objects corresponding to the original text (e.g., an object corresponding to the first text of the operation (1310)) and objects corresponding to the translation (e.g., an object representing the second text of the operation (1330)) within the electronic document (700). For example, the electronic device can store a first set of objects representing the original text and a second set of objects representing the translation. The electronic document of the operation (1330) can be displayed by rendering objects included in the second set among the first set and the second set. For example, a state of displaying the electronic document of the operation (1330) can be described as a state of rendering objects included in the second set.
도 13을 참고하면, 동작(1340) 내에서, 일 실시예에 따른, 전자 장치는, 제1 텍스트(또는 원본 전자 문서)를 표시하기 위한 제2 입력을 수신하였는지 여부를 식별할 수 있거나, 또는 결정할 수 있다. 번역과 관련된 설정 값을 수신하기 위한 팝업 메뉴(140)를 표시하는 전자 장치는, 상기 팝업 메뉴(140)를 통하여 동작(1340)의 제2 입력을 수신할 수 있다. 상기 제2 입력은, 팝업 메뉴(140)의 표시를 중단하는 아이콘(1345)을 선택하는 입력을 포함할 수 있다. 상기 제2 입력을 수신한 경우(1340-예), 전자 장치는 동작(1350)을 수행할 수 있다. 상기 제2 입력을 수신하기 이전에(1340-아니오), 전자 장치는 동작(1330)의 제2 텍스트를 포함하는 전자 문서를 표시하는 것을 유지할 수 있다. Referring to FIG. 13, in operation (1340), according to one embodiment, the electronic device may identify or determine whether a second input for displaying a first text (or an original electronic document) has been received. The electronic device, which displays a pop-up menu (140) for receiving a setting value related to translation, may receive the second input of operation (1340) through the pop-up menu (140). The second input may include an input for selecting an icon (1345) for stopping the display of the pop-up menu (140). If the second input is received (1340 - Yes), the electronic device may perform operation (1350). Prior to receiving the second input (1340 - No), the electronic device may continue to display the electronic document including the second text of operation (1330).
도 13을 참고하면, 동작(1350) 내에서, 일 실시예에 따른, 전자 장치는, 제2 텍스트 및 제1 텍스트 중에서, 제1 텍스트를 포함하는 전자 문서(700)를 표시할 수 있다. 동작(1340)의 제2 입력을 수신한 전자 장치는 팝업 메뉴(140)를 표시하는 것을 중단할 수 있다. 전자 장치는 제1 세트 또는 제2 세트 중에서, 제1 세트의 오브젝트들을 렌더링하여, 제1 텍스트를 포함하는 전자 문서(700)를 표시할 수 있다. 동작(1350)의 전자 문서(700)를 표시하는 전자 장치의 상태는, 제1 언어의 제1 텍스트로부터 번역된 제2 텍스트를 표시하는 것을 중단하는 상태로 설명될 수 있다. 예를 들어, 전자 장치는, 제2 텍스트를 표시하기 위한 모드(예, 번역 모드)를, 동작(1340)의 제2 입력을 수신할 시, 종료할 수 있다. 동작(1350) 내에서, 전자 장치는 번역문을 표시하기 위하여 메모리에 저장된, 제2 세트의 오브젝트들 전부를 제거할 수 있다. 예를 들어, 동작(1350) 내에서, 전자 문서, 및/또는 전자 문서를 나타내는 파일의 상태는, 제2 텍스트와 독립적으로, 동작(1310)의 전자 문서를 표시하던 시점의 상태로 복원될 수 있다. Referring to FIG. 13, in operation (1350), according to one embodiment, an electronic device may display an electronic document (700) including a first text among a second text and a first text. The electronic device, upon receiving a second input of operation (1340), may stop displaying a pop-up menu (140). The electronic device may render objects of the first set among the first set or the second set to display the electronic document (700) including the first text. The state of the electronic device displaying the electronic document (700) of operation (1350) may be described as a state in which the electronic device stops displaying a second text translated from the first text in the first language. For example, the electronic device may terminate a mode for displaying the second text (e.g., a translation mode) upon receiving the second input of operation (1340). In operation (1350), the electronic device may remove all objects of the second set stored in the memory in order to display the translated text. For example, within operation (1350), the state of the electronic document, and/or the state of the file representing the electronic document, can be restored to the state it was in at the time the electronic document of operation (1310) was displayed, independently of the second text.
상술한 바와 같이, 일 실시예에 따른, 전자 장치는 전자 문서의 원문 및 번역문을 선택적으로 표시할 수 있거나, 또는 제공할 수 있다. 예를 들어, 전자 장치는 메모리에, 상기 원문을 나타내는 오브젝트들의 제1 세트와 함께, 상기 번역문을 표시하기 위한 오브젝트들의 제2 세트를 저장할 수 있다. 전자 장치는, 사용자 입력(예, 동작(1340)의 제2 입력)에 따라, 상기 제1 세트 또는 상기 제2 세트에 기반하는 모드의 전환을 수행할 수 있다. 예를 들어, 상기 사용자 입력을 수신한 전자 장치는, 제2 세트의 오브젝트들에 기반하여 번역문을 포함하는 전자 문서를 렌더링하는 번역 모드로부터, 제1 세트의 오브젝트들에 기반하여 원문을 포함하는 전자 문서를 렌더링하는 원문 모드로 전환할 수 있다. As described above, according to one embodiment, an electronic device may selectively display or provide an original text and a translation of an electronic document. For example, the electronic device may store, in memory, a first set of objects representing the original text, together with a second set of objects for representing the translation. The electronic device may perform a mode switch based on the first set or the second set, based on a user input (e.g., the second input of operation 1340). For example, the electronic device, upon receiving the user input, may switch from a translation mode, which renders an electronic document including a translation based on the second set of objects, to an original text mode, which renders an electronic document including an original text based on the first set of objects.
도 1 내지 도 13을 참고하면, 번역문의 사이즈(예, 번역문에 포함된 문자들의 수)가 상기 번역문에 대응하는 원문(예, 도 1의 전자 문서(130))의 사이즈(예, 원문에 포함된 문자들의 수) 보다 큰 경우, 번역문에 포함된 오브젝트들 중 적어도 하나의 위치 및/또는 속성을 변경하는 일 실시예가 설명되었지만, 실시예가 이에 제한되는 것은 아니다. 예를 들어, 전자 장치는, 번역문의 사이즈가 원문의 사이즈 보다 작은 경우, 배치 알고리즘을 수행하여, 번역문에 포함된 오브젝트들 사이의 간격(예, 여백으로 지칭되는 공백 영역의 사이즈)을 줄이도록, 상기 오브젝트들의 위치 및/또는 속성을 변경할 수 있다. Referring to FIGS. 1 to 13, an embodiment of changing the position and/or properties of at least one object included in a translation when the size of the translation (e.g., the number of characters included in the translation) is larger than the size of the original text (e.g., the number of characters included in the original text) corresponding to the translation (e.g., the electronic document (130) of FIG. 1), but the embodiment is not limited thereto. For example, when the size of the translation is smaller than the size of the original text, the electronic device may change the positions and/or properties of the objects included in the translation so as to reduce the spacing between the objects (e.g., the size of the blank area referred to as a margin) between the objects.
예를 들어, 제1 언어의 제1 텍스트를 번역하여, 제2 언어의 제2 텍스트를 획득한 경우, 전자 장치는 상기 제1 텍스트의 전자 문서 내의 제1 영역의 사이즈 및 상기 제2 텍스트의 전자 문서 내의 제2 영역의 사이즈를 비교할 수 있다. 제1 텍스트의 속성을 이용하여 제2 텍스트를 표시할 시, 상기 제2 영역의 사이즈가 상기 제1 영역의 사이즈 보다 작은 경우, 전자 장치는 상기 제2 텍스트 이후에 표시되는 다른 오브젝트를, 상기 제2 텍스트 및 상기 다른 오브젝트 사이의 거리가 감소되도록, 전자 문서 내에서 이동할 수 있다. 예를 들어, 상기 제2 텍스트의 글자 수가 감소됨에 따라, 제2 텍스트에 의해 나타나는 단락(또는 문단)의 사이즈가 감소되는 경우, 전자 장치는 전자 문서 내에서 단락들 사이의 간격을 줄이기 위하여, 상기 단락 이후의 다른 단락을 이동할 수 있다. For example, when a first text in a first language is translated to obtain a second text in a second language, the electronic device may compare the size of a first area within the electronic document of the first text with the size of a second area within the electronic document of the second text. When displaying the second text using the properties of the first text, if the size of the second area is smaller than the size of the first area, the electronic device may move another object displayed after the second text within the electronic document so as to reduce the distance between the second text and the other object. For example, when the size of a paragraph (or paragraphs) represented by the second text is reduced as the number of characters in the second text is reduced, the electronic device may move another paragraph after the paragraph so as to reduce the space between paragraphs within the electronic document.
도 14는, 다양한 실시예들에 따른, 네트워크 환경(1400) 내의 전자 장치(1401)의 블록도이다. 도 14를 참고하면, 네트워크 환경(1400)에서 전자 장치(1401)는 제 1 네트워크(1498)(예: 근거리 무선 통신 네트워크)를 통하여 전자 장치(1402)와 통신하거나, 또는 제 2 네트워크(1499)(예: 원거리 무선 통신 네트워크)를 통하여 전자 장치(1404) 또는 서버(1408) 중 적어도 하나와 통신할 수 있다. 일실시예에 따르면, 전자 장치(1401)는 서버(1408)를 통하여 전자 장치(1404)와 통신할 수 있다. 일실시예에 따르면, 전자 장치(1401)는 프로세서(1420), 메모리(1430), 입력 모듈(1450), 음향 출력 모듈(1455), 디스플레이 모듈(1460), 오디오 모듈(1470), 센서 모듈(1476), 인터페이스(1477), 연결 단자(1478), 햅틱 모듈(1479), 카메라 모듈(1480), 전력 관리 모듈(1488), 배터리(1489), 통신 모듈(1490), 가입자 식별 모듈(1496), 또는 안테나 모듈(1497)을 포함할 수 있다. 어떤 실시예에서는, 전자 장치(1401)에는, 이 구성요소들 중 적어도 하나(예: 연결 단자(1478))가 생략되거나, 하나 이상의 다른 구성요소가 추가될 수 있다. 어떤 실시예에서는, 이 구성요소들 중 일부들(예: 센서 모듈(1476), 카메라 모듈(1480), 또는 안테나 모듈(1497))은 하나의 구성요소(예: 디스플레이 모듈(1460))로 통합될 수 있다.FIG. 14 is a block diagram of an electronic device (1401) within a network environment (1400) according to various embodiments. Referring to FIG. 14 , in the network environment (1400), the electronic device (1401) may communicate with the electronic device (1402) via a first network (1498) (e.g., a short-range wireless communication network), or may communicate with at least one of the electronic device (1404) or the server (1408) via a second network (1499) (e.g., a long-range wireless communication network). In one embodiment, the electronic device (1401) may communicate with the electronic device (1404) via the server (1408). According to one embodiment, the electronic device (1401) may include a processor (1420), a memory (1430), an input module (1450), an audio output module (1455), a display module (1460), an audio module (1470), a sensor module (1476), an interface (1477), a connection terminal (1478), a haptic module (1479), a camera module (1480), a power management module (1488), a battery (1489), a communication module (1490), a subscriber identification module (1496), or an antenna module (1497). In some embodiments, the electronic device (1401) may omit at least one of these components (e.g., the connection terminal (1478)), or may have one or more other components added. In some embodiments, some of these components (e.g., sensor module (1476), camera module (1480), or antenna module (1497)) may be integrated into a single component (e.g., display module (1460)).
프로세서(1420)는, 예를 들면, 소프트웨어(예: 프로그램(1440))를 실행하여 프로세서(1420)에 연결된 전자 장치(1401)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. 일실시예에 따르면, 데이터 처리 또는 연산의 적어도 일부로서, 프로세서(1420)는 다른 구성요소(예: 센서 모듈(1476) 또는 통신 모듈(1490))로부터 수신된 명령 또는 데이터를 휘발성 메모리(1432)에 저장하고, 휘발성 메모리(1432)에 저장된 명령 또는 데이터를 처리하고, 결과 데이터를 비휘발성 메모리(1434)에 저장할 수 있다. 일실시예에 따르면, 프로세서(1420)는 메인 프로세서(1421)(예: 중앙 처리 장치 또는 어플리케이션 프로세서) 또는 이와는 독립적으로 또는 함께 운영 가능한 보조 프로세서(1423)(예: 그래픽 처리 장치, 신경망 처리 장치(NPU: neural processing unit), 이미지 시그널 프로세서, 센서 허브 프로세서, 또는 커뮤니케이션 프로세서)를 포함할 수 있다. 예를 들어, 전자 장치(1401)가 메인 프로세서(1421) 및 보조 프로세서(1423)를 포함하는 경우, 보조 프로세서(1423)는 메인 프로세서(1421)보다 저전력을 사용하거나, 지정된 기능에 특화되도록 설정될 수 있다. 보조 프로세서(1423)는 메인 프로세서(1421)와 별개로, 또는 그 일부로서 구현될 수 있다.The processor (1420) may, for example, execute software (e.g., a program (1440)) to control at least one other component (e.g., a hardware or software component) of the electronic device (1401) connected to the processor (1420) and perform various data processing or operations. According to one embodiment, as at least a part of the data processing or operations, the processor (1420) may store commands or data received from other components (e.g., a sensor module (1476) or a communication module (1490)) in a volatile memory (1432), process the commands or data stored in the volatile memory (1432), and store result data in a non-volatile memory (1434). According to one embodiment, the processor (1420) may include a main processor (1421) (e.g., a central processing unit or an application processor) or an auxiliary processor (1423) (e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor) that can operate independently or together with the main processor (1421). For example, when the electronic device (1401) includes the main processor (1421) and the auxiliary processor (1423), the auxiliary processor (1423) may be configured to use less power than the main processor (1421) or to be specialized for a given function. The auxiliary processor (1423) may be implemented separately from the main processor (1421) or as a part thereof.
보조 프로세서(1423)는, 예를 들면, 메인 프로세서(1421)가 인액티브(예: 슬립) 상태에 있는 동안 메인 프로세서(1421)를 대신하여, 또는 메인 프로세서(1421)가 액티브(예: 어플리케이션 실행) 상태에 있는 동안 메인 프로세서(1421)와 함께, 전자 장치(1401)의 구성요소들 중 적어도 하나의 구성요소(예: 디스플레이 모듈(1460), 센서 모듈(1476), 또는 통신 모듈(1490))와 관련된 기능 또는 상태들의 적어도 일부를 제어할 수 있다. 일실시예에 따르면, 보조 프로세서(1423)(예: 이미지 시그널 프로세서 또는 커뮤니케이션 프로세서)는 기능적으로 관련 있는 다른 구성요소(예: 카메라 모듈(1480) 또는 통신 모듈(1490))의 일부로서 구현될 수 있다. 일실시예에 따르면, 보조 프로세서(1423)(예: 신경망 처리 장치)는 인공지능 모델의 처리에 특화된 하드웨어 구조를 포함할 수 있다. 인공지능 모델은 기계 학습을 통해 생성될 수 있다. 이러한 학습은, 예를 들어, 인공지능 모델이 수행되는 전자 장치(1401) 자체에서 수행될 수 있고, 별도의 서버(예: 서버(1408))를 통해 수행될 수도 있다. 학습 알고리즘은, 예를 들어, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning) 또는 강화 학습(reinforcement learning)을 포함할 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은, 복수의 인공 신경망 레이어들을 포함할 수 있다. 인공 신경망은 심층 신경망(DNN: deep neural network), CNN(convolutional neural network), RNN(recurrent neural network), RBM(restricted boltzmann machine), DBN(deep belief network), BRDNN(bidirectional recurrent deep neural network), 심층 Q-네트워크(deep Q-networks) 또는 상기 중 둘 이상의 조합 중 하나일 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은 하드웨어 구조 이외에, 추가적으로 또는 대체적으로, 소프트웨어 구조를 포함할 수 있다.The auxiliary processor (1423) may control at least a portion of functions or states associated with at least one component (e.g., the display module (1460), the sensor module (1476), or the communication module (1490)) of the electronic device (1401), for example, on behalf of the main processor (1421) while the main processor (1421) is in an inactive (e.g., sleep) state, or together with the main processor (1421) while the main processor (1421) is in an active (e.g., application execution) state. In one embodiment, the auxiliary processor (1423) (e.g., an image signal processor or a communication processor) may be implemented as a part of another functionally related component (e.g., a camera module (1480) or a communication module (1490)). In one embodiment, the auxiliary processor (1423) (e.g., a neural network processing unit) may include a hardware structure specialized for processing artificial intelligence models. The artificial intelligence models may be generated through machine learning. This learning can be performed, for example, in the electronic device (1401) itself where the artificial intelligence model is executed, or can be performed through a separate server (e.g., server (1408)). The learning algorithm can include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the examples described above. The artificial intelligence model can include a plurality of artificial neural network layers. The artificial neural network can be one of a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), deep Q-networks, or a combination of two or more of the above, but is not limited to the examples described above. In addition to the hardware structure, the artificial intelligence model can also or alternatively include a software structure.
메모리(1430)는, 전자 장치(1401)의 적어도 하나의 구성요소(예: 프로세서(1420) 또는 센서 모듈(1476))에 의해 사용되는 다양한 데이터를 저장할 수 있다. 데이터는, 예를 들어, 소프트웨어(예: 프로그램(1440)) 및, 이와 관련된 명령에 대한 입력 데이터 또는 출력 데이터를 포함할 수 있다. 메모리(1430)는, 휘발성 메모리(1432) 또는 비휘발성 메모리(1434)를 포함할 수 있다. The memory (1430) can store various data used by at least one component (e.g., the processor (1420) or the sensor module (1476)) of the electronic device (1401). The data can include, for example, software (e.g., the program (1440)) and input data or output data for commands related thereto. The memory (1430) can include volatile memory (1432) or non-volatile memory (1434).
프로그램(1440)은 메모리(1430)에 소프트웨어로서 저장될 수 있으며, 예를 들면, 운영 체제(1442), 미들 웨어(1444) 또는 어플리케이션(1446)을 포함할 수 있다. The program (1440) may be stored as software in memory (1430) and may include, for example, an operating system (1442), middleware (1444), or an application (1446).
입력 모듈(1450)은, 전자 장치(1401)의 구성요소(예: 프로세서(1420))에 사용될 명령 또는 데이터를 전자 장치(1401)의 외부(예: 사용자)로부터 수신할 수 있다. 입력 모듈(1450)은, 예를 들면, 마이크, 마우스, 키보드, 키(예: 버튼), 또는 디지털 펜(예: 스타일러스 펜)을 포함할 수 있다. The input module (1450) can receive commands or data to be used in a component of the electronic device (1401) (e.g., a processor (1420)) from an external source (e.g., a user) of the electronic device (1401). The input module (1450) can include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).
음향 출력 모듈(1455)은 음향 신호를 전자 장치(1401)의 외부로 출력할 수 있다. 음향 출력 모듈(1455)은, 예를 들면, 스피커 또는 리시버를 포함할 수 있다. 스피커는 멀티미디어 재생 또는 녹음 재생과 같이 일반적인 용도로 사용될 수 있다. 리시버는 착신 전화를 수신하기 위해 사용될 수 있다. 일실시예에 따르면, 리시버는 스피커와 별개로, 또는 그 일부로서 구현될 수 있다.The audio output module (1455) can output audio signals to the outside of the electronic device (1401). The audio output module (1455) can include, for example, a speaker or a receiver. The speaker can be used for general purposes, such as multimedia playback or recording playback. The receiver can be used to receive incoming calls. In one embodiment, the receiver can be implemented separately from the speaker or as part of the speaker.
디스플레이 모듈(1460)은 전자 장치(1401)의 외부(예: 사용자)로 정보를 시각적으로 제공할 수 있다. 디스플레이 모듈(1460)은, 예를 들면, 디스플레이, 홀로그램 장치, 또는 프로젝터 및 해당 장치를 제어하기 위한 제어 회로를 포함할 수 있다. 일실시예에 따르면, 디스플레이 모듈(1460)은 터치를 감지하도록 설정된 터치 센서, 또는 상기 터치에 의해 발생되는 힘의 세기를 측정하도록 설정된 압력 센서를 포함할 수 있다. The display module (1460) can visually provide information to an external party (e.g., a user) of the electronic device (1401). The display module (1460) may include, for example, a display, a holographic device, or a projector, and a control circuit for controlling the device. In one embodiment, the display module (1460) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of a force generated by the touch.
오디오 모듈(1470)은 소리를 전기 신호로 변환시키거나, 반대로 전기 신호를 소리로 변환시킬 수 있다. 일실시예에 따르면, 오디오 모듈(1470)은, 입력 모듈(1450)을 통해 소리를 획득하거나, 음향 출력 모듈(1455), 또는 전자 장치(1401)와 직접 또는 무선으로 연결된 외부 전자 장치(예: 전자 장치(1402))(예: 스피커 또는 헤드폰)를 통해 소리를 출력할 수 있다.The audio module (1470) can convert sound into an electrical signal, or vice versa. According to one embodiment, the audio module (1470) can acquire sound through the input module (1450), output sound through the sound output module (1455), or an external electronic device (e.g., electronic device (1402)) (e.g., speaker or headphone) directly or wirelessly connected to the electronic device (1401).
센서 모듈(1476)은 전자 장치(1401)의 작동 상태(예: 전력 또는 온도), 또는 외부의 환경 상태(예: 사용자 상태)를 감지하고, 감지된 상태에 대응하는 전기 신호 또는 데이터 값을 생성할 수 있다. 일실시예에 따르면, 센서 모듈(1476)은, 예를 들면, 제스처 센서, 자이로 센서, 기압 센서, 마그네틱 센서, 가속도 센서, 그립 센서, 근접 센서, 컬러 센서, IR(infrared) 센서, 생체 센서, 온도 센서, 습도 센서, 또는 조도 센서를 포함할 수 있다. The sensor module (1476) can detect the operating status (e.g., power or temperature) of the electronic device (1401) or the external environmental status (e.g., user status) and generate an electrical signal or data value corresponding to the detected status. According to one embodiment, the sensor module (1476) can include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.
인터페이스(1477)는 전자 장치(1401)가 외부 전자 장치(예: 전자 장치(1402))와 직접 또는 무선으로 연결되기 위해 사용될 수 있는 하나 이상의 지정된 프로토콜들을 지원할 수 있다. 일실시예에 따르면, 인터페이스(1477)는, 예를 들면, HDMI(high definition multimedia interface), USB(universal serial bus) 인터페이스, SD카드 인터페이스, 또는 오디오 인터페이스를 포함할 수 있다.The interface (1477) may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device (1401) with an external electronic device (e.g., the electronic device (1402)). In one embodiment, the interface (1477) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.
연결 단자(1478)는, 그를 통해서 전자 장치(1401)가 외부 전자 장치(예: 전자 장치(1402))와 물리적으로 연결될 수 있는 커넥터를 포함할 수 있다. 일실시예에 따르면, 연결 단자(1478)는, 예를 들면, HDMI 커넥터, USB 커넥터, SD 카드 커넥터, 또는 오디오 커넥터(예: 헤드폰 커넥터)를 포함할 수 있다.The connection terminal (1478) may include a connector through which the electronic device (1401) may be physically connected to an external electronic device (e.g., the electronic device (1402)). In one embodiment, the connection terminal (1478) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).
햅틱 모듈(1479)은 전기적 신호를 사용자가 촉각 또는 운동 감각을 통해서 인지할 수 있는 기계적인 자극(예: 진동 또는 움직임) 또는 전기적인 자극으로 변환할 수 있다. 일실시예에 따르면, 햅틱 모듈(1479)은, 예를 들면, 모터, 압전 소자, 또는 전기 자극 장치를 포함할 수 있다.The haptic module (1479) can convert electrical signals into mechanical stimuli (e.g., vibration or movement) or electrical stimuli that a user can perceive through tactile or kinesthetic sensations. In one embodiment, the haptic module (1479) may include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
카메라 모듈(1480)은 정지 영상 및 동영상을 촬영할 수 있다. 일실시예에 따르면, 카메라 모듈(1480)은 하나 이상의 렌즈들, 이미지 센서들, 이미지 시그널 프로세서들, 또는 플래시들을 포함할 수 있다.The camera module (1480) can capture still images and videos. In one embodiment, the camera module (1480) may include one or more lenses, image sensors, image signal processors, or flashes.
전력 관리 모듈(1488)은 전자 장치(1401)에 공급되는 전력을 관리할 수 있다. 일실시예에 따르면, 전력 관리 모듈(1488)은, 예를 들면, PMIC(power management integrated circuit)의 적어도 일부로서 구현될 수 있다.The power management module (1488) can manage the power supplied to the electronic device (1401). According to one embodiment, the power management module (1488) can be implemented as, for example, at least a part of a power management integrated circuit (PMIC).
배터리(1489)는 전자 장치(1401)의 적어도 하나의 구성요소에 전력을 공급할 수 있다. 일실시예에 따르면, 배터리(1489)는, 예를 들면, 재충전 불가능한 1차 전지, 재충전 가능한 2차 전지 또는 연료 전지를 포함할 수 있다.A battery (1489) may power at least one component of the electronic device (1401). In one embodiment, the battery (1489) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.
통신 모듈(1490)은 전자 장치(1401)와 외부 전자 장치(예: 전자 장치(1402), 전자 장치(1404), 또는 서버(1408)) 간의 직접(예: 유선) 통신 채널 또는 무선 통신 채널의 수립, 및 수립된 통신 채널을 통한 통신 수행을 지원할 수 있다. 통신 모듈(1490)은 프로세서(1420)(예: 어플리케이션 프로세서)와 독립적으로 운영되고, 직접(예: 유선) 통신 또는 무선 통신을 지원하는 하나 이상의 커뮤니케이션 프로세서를 포함할 수 있다. 일실시예에 따르면, 통신 모듈(1490)은 무선 통신 모듈(1492)(예: 셀룰러 통신 모듈, 근거리 무선 통신 모듈, 또는 GNSS(global navigation satellite system) 통신 모듈) 또는 유선 통신 모듈(1494)(예: LAN(local area network) 통신 모듈, 또는 전력선 통신 모듈)을 포함할 수 있다. 이들 통신 모듈 중 해당하는 통신 모듈은 제 1 네트워크(1498)(예: 블루투스, WiFi(wireless fidelity) direct 또는 IrDA(infrared data association)와 같은 근거리 통신 네트워크) 또는 제 2 네트워크(1499)(예: 레거시 셀룰러 네트워크, 5G 네트워크, 차세대 통신 네트워크, 인터넷, 또는 컴퓨터 네트워크(예: LAN 또는 WAN)와 같은 원거리 통신 네트워크)를 통하여 외부의 전자 장치(1404)와 통신할 수 있다. 이런 여러 종류의 통신 모듈들은 하나의 구성요소(예: 단일 칩)로 통합되거나, 또는 서로 별도의 복수의 구성요소들(예: 복수 칩들)로 구현될 수 있다. 무선 통신 모듈(1492)은 가입자 식별 모듈(1496)에 저장된 가입자 정보(예: 국제 모바일 가입자 식별자(IMSI))를 이용하여 제 1 네트워크(1498) 또는 제 2 네트워크(1499)와 같은 통신 네트워크 내에서 전자 장치(1401)를 확인 또는 인증할 수 있다. The communication module (1490) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device (1401) and an external electronic device (e.g., electronic device (1402), electronic device (1404), or server (1408)), and the performance of communication through the established communication channel. The communication module (1490) may operate independently from the processor (1420) (e.g., application processor) and may include one or more communication processors that support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module (1490) may include a wireless communication module (1492) (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module (1494) (e.g., a local area network (LAN) communication module, or a power line communication module). Any of these communication modules may communicate with an external electronic device (1404) via a first network (1498) (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (1499) (e.g., a long-range communication network such as a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a local area network or a wide area network)). These various types of communication modules may be integrated into a single component (e.g., a single chip) or implemented as multiple separate components (e.g., multiple chips). The wireless communication module (1492) may use subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (1496) to verify or authenticate the electronic device (1401) within a communication network such as the first network (1498) or the second network (1499).
무선 통신 모듈(1492)은 4G 네트워크 이후의 5G 네트워크 및 차세대 통신 기술, 예를 들어, NR 접속 기술(new radio access technology)을 지원할 수 있다. NR 접속 기술은 고용량 데이터의 고속 전송(eMBB(enhanced mobile broadband)), 단말 전력 최소화와 다수 단말의 접속(mMTC(massive machine type communications)), 또는 고신뢰도와 저지연(URLLC(ultra-reliable and low-latency communications))을 지원할 수 있다. 무선 통신 모듈(1492)은, 예를 들어, 높은 데이터 전송률 달성을 위해, 고주파 대역(예: mmWave 대역)을 지원할 수 있다. 무선 통신 모듈(1492)은 고주파 대역에서의 성능 확보를 위한 다양한 기술들, 예를 들어, 빔포밍(beamforming), 거대 배열 다중 입출력(massive MIMO(multiple-input and multiple-output)), 전차원 다중입출력(FD-MIMO: full dimensional MIMO), 어레이 안테나(array antenna), 아날로그 빔형성(analog beam-forming), 또는 대규모 안테나(large scale antenna)와 같은 기술들을 지원할 수 있다. 무선 통신 모듈(1492)은 전자 장치(1401), 외부 전자 장치(예: 전자 장치(1404)) 또는 네트워크 시스템(예: 제 2 네트워크(1499))에 규정되는 다양한 요구사항을 지원할 수 있다. 일실시예에 따르면, 무선 통신 모듈(1492)은 eMBB 실현을 위한 Peak data rate(예: 20Gbps 이상), mMTC 실현을 위한 손실 Coverage(예: 164dB 이하), 또는 URLLC 실현을 위한 U-plane latency(예: 다운링크(DL) 및 업링크(UL) 각각 0.5ms 이하, 또는 라운드 트립 1ms 이하)를 지원할 수 있다.The wireless communication module (1492) can support 5G networks and next-generation communication technologies following the 4G network, such as NR access technology (new radio access technology). NR access technology can support high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimizing terminal power and connecting multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency communications (URLLC (ultra-reliable and low-latency communications)). The wireless communication module (1492) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate. The wireless communication module (1492) may support various technologies for securing performance in high-frequency bands, such as beamforming, massive multiple-input and multiple-output (MIMO), full dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large scale antenna. The wireless communication module (1492) may support various requirements specified in the electronic device (1401), an external electronic device (e.g., the electronic device (1404)), or a network system (e.g., the second network (1499)). According to one embodiment, the wireless communication module (1492) may support a peak data rate (e.g., 20 Gbps or more) for eMBB implementation, a loss coverage (e.g., 164 dB or less) for mMTC implementation, or a U-plane latency (e.g., 0.5 ms or less for downlink (DL) and uplink (UL), or 1 ms or less for round trip) for URLLC implementation.
안테나 모듈(1497)은 신호 또는 전력을 외부(예: 외부의 전자 장치)로 송신하거나 외부로부터 수신할 수 있다. 일실시예에 따르면, 안테나 모듈(1497)은 서브스트레이트(예: PCB) 위에 형성된 도전체 또는 도전성 패턴으로 이루어진 방사체를 포함하는 안테나를 포함할 수 있다. 일실시예에 따르면, 안테나 모듈(1497)은 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다. 이런 경우, 제 1 네트워크(1498) 또는 제 2 네트워크(1499)와 같은 통신 네트워크에서 사용되는 통신 방식에 적합한 적어도 하나의 안테나가, 예를 들면, 통신 모듈(1490)에 의하여 상기 복수의 안테나들로부터 선택될 수 있다. 신호 또는 전력은 상기 선택된 적어도 하나의 안테나를 통하여 통신 모듈(1490)과 외부의 전자 장치 간에 송신되거나 수신될 수 있다. 어떤 실시예에 따르면, 방사체 이외에 다른 부품(예: RFIC(radio frequency integrated circuit))이 추가로 안테나 모듈(1497)의 일부로 형성될 수 있다. The antenna module (1497) can transmit or receive signals or power to or from an external device (e.g., an external electronic device). In one embodiment, the antenna module (1497) may include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). In one embodiment, the antenna module (1497) may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network, such as the first network (1498) or the second network (1499), may be selected from the plurality of antennas by, for example, the communication module (1490). A signal or power may be transmitted or received between the communication module (1490) and the external electronic device via the selected at least one antenna. In some embodiments, in addition to the radiator, another component (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module (1497).
다양한 실시예에 따르면, 안테나 모듈(1497)은 mmWave 안테나 모듈을 형성할 수 있다. 일실시예에 따르면, mmWave 안테나 모듈은 인쇄 회로 기판, 상기 인쇄 회로 기판의 제 1 면(예: 아래 면)에 또는 그에 인접하여 배치되고 지정된 고주파 대역(예: mmWave 대역)을 지원할 수 있는 RFIC, 및 상기 인쇄 회로 기판의 제 2 면(예: 윗 면 또는 측 면)에 또는 그에 인접하여 배치되고 상기 지정된 고주파 대역의 신호를 송신 또는 수신할 수 있는 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다.According to various embodiments, the antenna module (1497) may form a mmWave antenna module. In one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent a first side (e.g., a bottom side) of the printed circuit board and capable of supporting a designated high frequency band (e.g., a mmWave band), and a plurality of antennas (e.g., an array antenna) disposed on or adjacent a second side (e.g., a top side or a side side) of the printed circuit board and capable of transmitting or receiving signals in the designated high frequency band.
상기 구성요소들 중 적어도 일부는 주변 기기들간 통신 방식(예: 버스, GPIO(general purpose input and output), SPI(serial peripheral interface), 또는 MIPI(mobile industry processor interface))을 통해 서로 연결되고 신호(예: 명령 또는 데이터)를 상호간에 교환할 수 있다.At least some of the above components can be interconnected and exchange signals (e.g., commands or data) with each other via a communication method between peripheral devices (e.g., a bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)).
일 실시예에 따르면, 명령 또는 데이터는 제 2 네트워크(1499)에 연결된 서버(1408)를 통해서 전자 장치(1401)와 외부의 전자 장치(1404)간에 송신 또는 수신될 수 있다. 외부의 전자 장치(1402, 또는 704) 각각은 전자 장치(1401)와 동일한 또는 다른 종류의 장치일 수 있다. 일실시예에 따르면, 전자 장치(1401)에서 실행되는 동작들의 전부 또는 일부는 외부의 전자 장치들(1402, 1404, 또는 708) 중 하나 이상의 외부의 전자 장치들에서 실행될 수 있다. 예를 들면, 전자 장치(1401)가 어떤 기능이나 서비스를 자동으로, 또는 사용자 또는 다른 장치로부터의 요청에 반응하여 수행해야 할 경우에, 전자 장치(1401)는 기능 또는 서비스를 자체적으로 실행시키는 대신에 또는 추가적으로, 하나 이상의 외부의 전자 장치들에게 그 기능 또는 그 서비스의 적어도 일부를 수행하라고 요청할 수 있다. 상기 요청을 수신한 하나 이상의 외부의 전자 장치들은 요청된 기능 또는 서비스의 적어도 일부, 또는 상기 요청과 관련된 추가 기능 또는 서비스를 실행하고, 그 실행의 결과를 전자 장치(1401)로 전달할 수 있다. 전자 장치(1401)는 상기 결과를, 그대로 또는 추가적으로 처리하여, 상기 요청에 대한 응답의 적어도 일부로서 제공할 수 있다. 이를 위하여, 예를 들면, 클라우드 컴퓨팅, 분산 컴퓨팅, 모바일 에지 컴퓨팅(MEC: mobile edge computing), 또는 클라이언트-서버 컴퓨팅 기술이 이용될 수 있다. 전자 장치(1401)는, 예를 들어, 분산 컴퓨팅 또는 모바일 에지 컴퓨팅을 이용하여 초저지연 서비스를 제공할 수 있다. 일 실시예에 있어서, 외부의 전자 장치(1404)는 IoT(internet of things) 기기를 포함할 수 있다. 서버(1408)는 기계 학습 및/또는 신경망을 이용한 지능형 서버일 수 있다. 일실시예에 따르면, 외부의 전자 장치(1404) 또는 서버(1408)는 제 2 네트워크(1499) 내에 포함될 수 있다. 전자 장치(1401)는 5G 통신 기술 및 IoT 관련 기술을 기반으로 지능형 서비스(예: 스마트 홈, 스마트 시티, 스마트 카, 또는 헬스 케어)에 적용될 수 있다. According to one embodiment, commands or data may be transmitted or received between the electronic device (1401) and an external electronic device (1404) via a server (1408) connected to a second network (1499). Each of the external electronic devices (1402 or 704) may be the same or a different type of device as the electronic device (1401). According to one embodiment, all or part of the operations executed in the electronic device (1401) may be executed in one or more of the external electronic devices (1402, 1404, or 708). For example, when the electronic device (1401) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (1401) may, instead of or in addition to executing the function or service itself, request one or more external electronic devices to perform the function or at least a part of the service. One or more external electronic devices that receive the request may execute at least a portion of the requested function or service, or an additional function or service related to the request, and transmit the result of the execution to the electronic device (1401). The electronic device (1401) may process the result as is or additionally and provide it as at least a portion of a response to the request. For this purpose, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used, for example. The electronic device (1401) may provide an ultra-low latency service using distributed computing or mobile edge computing, for example. In one embodiment, the external electronic device (1404) may include an Internet of Things (IoT) device. The server (1408) may be an intelligent server utilizing machine learning and/or a neural network. According to one embodiment, the external electronic device (1404) or the server (1408) may be included in a second network (1499). The electronic device (1401) can be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology.
본 문서에 개시된 다양한 실시예들에 따른 전자 장치는 다양한 형태의 장치가 될 수 있다. 전자 장치는, 예를 들면, 휴대용 통신 장치(예: 스마트폰), 컴퓨터 장치, 휴대용 멀티미디어 장치, 휴대용 의료 기기, 카메라, 웨어러블 장치, 또는 가전 장치를 포함할 수 있다. 본 문서의 실시예에 따른 전자 장치는 전술한 기기들에 한정되지 않는다.Electronic devices according to the various embodiments disclosed in this document may take various forms. Electronic devices may include, for example, portable communication devices (e.g., smartphones), computer devices, portable multimedia devices, portable medical devices, cameras, wearable devices, or home appliances. Electronic devices according to the embodiments of this document are not limited to the aforementioned devices.
본 문서의 다양한 실시예들 및 이에 사용된 용어들은 본 문서에 기재된 기술적 특징들을 특정한 실시예들로 한정하려는 것이 아니며, 해당 실시예의 다양한 변경, 균등물, 또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 또는 관련된 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 아이템에 대응하는 명사의 단수 형은 관련된 문맥상 명백하게 다르게 지시하지 않는 한, 상기 아이템 한 개 또는 복수 개를 포함할 수 있다. 본 문서에서, "A 또는 B", "A 및 B 중 적어도 하나", "A 또는 B 중 적어도 하나", "A, B 또는 C", "A, B 및 C 중 적어도 하나", 및 "A, B, 또는 C 중 적어도 하나"와 같은 문구들 각각은 그 문구들 중 해당하는 문구에 함께 나열된 항목들 중 어느 하나, 또는 그들의 모든 가능한 조합을 포함할 수 있다. "제 1", "제 2", 또는 "첫째" 또는 "둘째"와 같은 용어들은 단순히 해당 구성요소를 다른 해당 구성요소와 구분하기 위해 사용될 수 있으며, 해당 구성요소들을 다른 측면(예: 중요성 또는 순서)에서 한정하지 않는다. 어떤(예: 제 1) 구성요소가 다른(예: 제 2) 구성요소에, "기능적으로" 또는 "통신적으로"라는 용어와 함께 또는 이런 용어 없이, "커플드" 또는 "커넥티드"라고 언급된 경우, 그것은 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로(예: 유선으로), 무선으로, 또는 제 3 구성요소를 통하여 연결될 수 있다는 것을 의미한다.The various embodiments of this document and the terminology used therein are not intended to limit the technical features described in this document to specific embodiments, but should be understood to include various modifications, equivalents, or substitutes of the embodiments. In connection with the description of the drawings, similar reference numerals may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of the items, unless the context clearly indicates otherwise. In this document, each of the phrases "A or B", "at least one of A and B", "at least one of A or B", "A, B, or C", "at least one of A, B, and C", and "at least one of A, B, or C" can include any one of the items listed together in the corresponding phrase among those phrases, or all possible combinations thereof. Terms such as "first," "second," or "first" or "second" may be used merely to distinguish one component from another, and do not limit the components in any other respect (e.g., importance or order). When a component (e.g., a first component) is referred to as "coupled" or "connected" to another (e.g., a second component), with or without the terms "functionally" or "communicatively," it means that the component can be connected to the other component directly (e.g., wired), wirelessly, or through a third component.
본 문서의 다양한 실시예들에서 사용된 용어 "모듈"은 하드웨어로 구현된 유닛을 포함할 수 있으며, 예를 들면, 로직, 블록, 부품, 또는 회로와 같은 용어와 상호 호환적으로 사용될 수 있다. 모듈은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는, 상기 부품의 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 일실시예에 따르면, 모듈은 ASIC(application-specific integrated circuit)의 형태로 구현될 수 있다. The term "module" used in various embodiments of this document may include a unit implemented in hardware, and may be used interchangeably with terms such as logic, block, component, or circuit. A module may be an integral component, or a minimum unit or part of such a component that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC).
본 문서의 다양한 실시예들은 기기(machine)(예: 전자 장치(1401)) 의해 읽을 수 있는 저장 매체(storage medium)(예: 내장 메모리(1436) 또는 외장 메모리(1438))에 저장된 하나 이상의 명령어들을 포함하는 소프트웨어(예: 프로그램(1440))로서 구현될 수 있다. 예를 들면, 기기(예: 전자 장치(1401))의 프로세서(예: 프로세서(1420))는, 저장 매체로부터 저장된 하나 이상의 명령어들 중 적어도 하나의 명령을 호출하고, 그것을 실행할 수 있다. 이것은 기기가 상기 호출된 적어도 하나의 명령어에 따라 적어도 하나의 기능을 수행하도록 운영되는 것을 가능하게 한다. 상기 하나 이상의 명령어들은 컴파일러에 의해 생성된 코드 또는 인터프리터에 의해 실행될 수 있는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장 매체는, 비일시적(non-transitory) 저장 매체의 형태로 제공될 수 있다. 여기서, '비일시적'은 저장 매체가 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장 매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다.Various embodiments of the present document may be implemented as software (e.g., a program (1440)) including one or more instructions stored in a storage medium (e.g., an internal memory (1436) or an external memory (1438)) readable by a machine (e.g., an electronic device (1401)). For example, a processor (e.g., a processor (1420)) of the machine (e.g., an electronic device (1401)) may call at least one instruction among the one or more instructions stored from the storage medium and execute it. This enables the machine to operate to perform at least one function according to the at least one called instruction. The one or more instructions may include code generated by a compiler or code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory' simply means that the storage medium is a tangible device and does not contain signals (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently or temporarily on the storage medium.
일 실시예에 따르면, 본 문서에 개시된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory(CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 또는 두 개의 사용자 장치들(예: 스마트 폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.According to one embodiment, the method according to various embodiments disclosed in the present document may be provided as included in a computer program product. The computer program product may be traded as a product between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., compact disc read only memory (CD-ROM)), or may be distributed online (e.g., downloaded or uploaded) via an application store (e.g., Play Store ™ ) or directly between two user devices (e.g., smart phones). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily generated in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.
다양한 실시예들에 따르면, 상기 기술한 구성요소들의 각각의 구성요소(예: 모듈 또는 프로그램)는 단수 또는 복수의 개체를 포함할 수 있으며, 복수의 개체 중 일부는 다른 구성요소에 분리 배치될 수도 있다. 다양한 실시예들에 따르면, 전술한 해당 구성요소들 중 하나 이상의 구성요소들 또는 동작들이 생략되거나, 또는 하나 이상의 다른 구성요소들 또는 동작들이 추가될 수 있다. 대체적으로 또는 추가적으로, 복수의 구성요소들(예: 모듈 또는 프로그램)은 하나의 구성요소로 통합될 수 있다. 이런 경우, 통합된 구성요소는 상기 복수의 구성요소들 각각의 구성요소의 하나 이상의 기능들을 상기 통합 이전에 상기 복수의 구성요소들 중 해당 구성요소에 의해 수행되는 것과 동일 또는 유사하게 수행할 수 있다. 다양한 실시예들에 따르면, 모듈, 프로그램 또는 다른 구성요소에 의해 수행되는 동작들은 순차적으로, 병렬적으로, 반복적으로, 또는 휴리스틱하게 실행되거나, 상기 동작들 중 하나 이상이 다른 순서로 실행되거나, 생략되거나, 또는 하나 이상의 다른 동작들이 추가될 수 있다. 도 14의 전자 장치(1401)는, 도 1 내지 도 2의 전자 장치(101)의 일 예일 수 있다. According to various embodiments, each component (e.g., a module or a program) of the above-described components may include one or more entities, and some of the entities may be separately arranged in other components. According to various embodiments, one or more components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added. Alternatively or additionally, a plurality of components (e.g., a module or a program) may be integrated into a single component. In this case, the integrated component may perform one or more functions of each of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to integration. According to various embodiments, operations performed by a module, program, or other component may be executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations may be executed in a different order, omitted, or one or more other operations may be added. The electronic device (1401) of FIG. 14 may be an example of the electronic device (101) of FIGS. 1 and 2.
일 실시예에서, 전자 문서에 포함된 제1 텍스트를 번역하는 방안이 요구될 수 있다. 제1 언어의 제1 텍스트로부터 번역된, 제2 언어의 제2 텍스트를 포함하는 전자 문서를 표시할 시, 제1 텍스트 및 제2 텍스트의 길이들 사이의 차이를 보상하는 방안이 요구될 수 있다. 제1 텍스트가 위치된 전자 문서의 제1 영역 보다, 제2 텍스트가 위치될 전자 문서의 제2 영역의 사이즈가 더 큰 경우, 제2 텍스트가 제2 텍스트에 인접한 콘텐트와 중첩되지 않게 만드는 방안이 요구될 수 있다. 상술한 바와 같은, 일 실시예(an embodiment)에 따른, 전자 장치(electronic device)(예, 도 1 및/또는 도 2의 전자 장치(101), 및/또는 도 14의 전자 장치(1401))는, 디스플레이(예, 도 1 및/또는 도 2의 디스플레이(110)), 하나 이상의 저장 매체들을 포함하고, 인스트럭션들을 저장하는 메모리(예, 도 2의 메모리(220)), 및 처리 회로를 포함하는, 적어도 하나의 프로세서(예, 도 2의 프로세서(210))를 포함할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 전자 문서(예, 도 1의 전자 문서(130)) 내의 제1 영역(예, 도 7a 및/또는 도 7b의 제1 영역(710)) 내에 포함된, 제1 언어의 제1 텍스트(예, 도 1의 제1 텍스트(131), 도 4의 제1 텍스트(410))의 번역을 위한 입력을 수신하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 입력에 기반하여, 상기 제1 텍스트로부터 번역된 제2 언어의 제2 텍스트(예, 도 1의 제2 텍스트(151), 도 4의 제2 텍스트(460))를 획득하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 전자 문서 내에서, 상기 제2 텍스트를 표시하기 위한 영역의 사이즈를 식별하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 전자 문서 내의 상기 제1 영역의 사이즈 보다 큰 상기 영역의 상기 사이즈에 기반하여, 상기 전자 문서 내의 상기 제1 영역, 및 상기 전자 문서의 수직 방향을 따라 상기 제1 영역에 인접한, 상기 전자 문서 내의 제1 공백 영역을 포함하는, 상기 전자 문서 내의 제2 영역(예, 도 7b의 제2 영역(760))의 사이즈를 식별하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 제1 영역 및 상기 제1 공백 영역을 포함하는 상기 제2 영역에서 상기 제2 텍스트를 포함하는 상기 전자 문서를 표시하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 제2 영역의 상기 사이즈 보다 큰 상기 영역의 상기 사이즈에 기반하여, 상기 제1 영역, 및 상기 전자 문서의 수평 방향을 따라 상기 제1 영역에 인접한, 상기 전자 문서 내의 제2 공백 영역을 포함하는, 상기 전자 문서 내의 제3 영역에서, 상기 제2 텍스트를 포함하는 상기 전자 문서를 표시하도록, 야기할 수 있다. 일 실시예에 따른, 전자 장치는 전자 문서에 포함된 제1 텍스트를 번역할 수 있다. 일 실시예에 따른, 전자 장치는 제1 언어의 제1 텍스트로부터 번역된, 제2 언어의 제2 텍스트를 포함하는 전자 문서를 표시할 시, 제1 텍스트 및 제2 텍스트의 길이들 사이의 차이를 보상할 수 있다. 제1 텍스트가 위치된 제1 영역 보다, 제2 텍스트가 위치될 전자 문서의 제2 영역의 사이즈가 더 큰 경우, 전자 장치는, 제2 텍스트가 제2 텍스트에 인접한 콘텐트와 중첩되지 않게 만들 수 있다. In one embodiment, a method for translating first text included in an electronic document may be required. When displaying an electronic document including second text in a second language, translated from a first text in a first language, a method for compensating for a difference in length between the first and second texts may be required. If the size of the second area of the electronic document where the second text is to be positioned is larger than the size of the first area of the electronic document where the first text is positioned, a method for preventing the second text from overlapping with content adjacent to the second text may be required. According to an embodiment as described above, an electronic device (e.g., electronic device (101) of FIG. 1 and/or FIG. 2, and/or electronic device (1401) of FIG. 14) may include a display (e.g., display (110) of FIG. 1 and/or FIG. 2), a memory (e.g., memory (220) of FIG. 2) including one or more storage media and storing instructions, and at least one processor (e.g., processor (210) of FIG. 2) including processing circuitry. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to receive an input for translating a first text in a first language (e.g., the first text (131) in FIG. 1 , the first text (410) in FIG. 4 ) contained in a first area (e.g., the first area (710) in FIG. 7A and/or FIG. 7B ) within an electronic document (e.g., the electronic document (130) in FIG. 1 ). The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to obtain, based on the input, a second text in a second language (e.g., the second text (151) in FIG. 1 , the second text (460) in FIG. 4 ) translated from the first text. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify a size of an area for displaying the second text within the electronic document. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify a size of a second area within the electronic document (e.g., second area 760 of FIG. 7B ) that includes the first area within the electronic document and a first blank area within the electronic document, adjacent to the first area along a vertical direction of the electronic document, based on a size of the area that is greater than a size of the first area within the electronic document. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to display the electronic document including the second text in the second area that includes the first area and the first blank area. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to display the electronic document including the second text in a third area within the electronic document, the third area including the first area and a second blank area within the electronic document adjacent to the first area along a horizontal direction of the electronic document, based on the size of the area being greater than the size of the second area. In one embodiment, the electronic device may translate the first text included in the electronic document. In one embodiment, the electronic device may compensate for a difference between the lengths of the first text and the second text when displaying the electronic document including the second text in a second language, translated from the first text in the first language. When the size of the second area of the electronic document where the second text is to be positioned is larger than the size of the first area where the first text is positioned, the electronic device may prevent the second text from overlapping with content adjacent to the second text.
예를 들어, 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 제1 영역의 상기 사이즈 보다 큰 상기 영역의 사이즈에 기반하여, 상기 제2 언어의 상기 제2 텍스트가, 상기 제1 텍스트의 상기 속성과 다른 속성을 가지도록, 상기 제2 언어의 상기 제2 텍스트의 속성을 조절하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 조절된 속성을 가지는 상기 제2 언어의 상기 제2 텍스트를, 상기 제1 영역의 시작 위치로부터 표시하도록, 야기할 수 있다.For example, the instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to adjust an attribute of the second text in the second language such that the second text in the second language has an attribute different from the attribute of the first text, based on a size of the region that is greater than the size of the first region. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to display the second text in the second language having the adjusted attribute from a start position of the first region.
예를 들어, 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 폰트 사이즈, 및 라인 간격 중 적어도 하나를 감소하여, 상기 제2 텍스트의 상기 속성을 조절하도록, 야기할 수 있다.For example, the instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to adjust the property of the second text by decreasing at least one of a font size and a line spacing.
예를 들어, 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 제1 폰트 사이즈를 가지는 제1 부분, 및 상기 제1 폰트 사이즈 보다 작은 제2 폰트 사이즈를 가지는 제2 부분을 포함하는 상기 제1 텍스트의 번역을 위한 상기 입력을 수신하는 것에 기반하여, 상기 제1 부분에 대응하는 제3 부분, 및 상기 제2 부분에 대응하는 제4 부분을 포함하는 상기 제2 텍스트를 획득하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 제1 영역을 통해 표현된 상기 제1 부분의 사이즈 보다 큰, 상기 제2 텍스트 내의 상기 제3 부분의 사이즈를 식별하는 것에 기반하여, 상기 제3 부분의 폰트 사이즈를, 상기 제1 폰트 사이즈 보다 작고, 제2 폰트 사이즈 보다 큰, 제3 폰트 사이즈로 변경하도록, 야기할 수 있다.For example, the instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to obtain, based on receiving the input for translation of the first text, the first text including a first portion having a first font size and a second portion having a second font size smaller than the first font size, the second text including a third portion corresponding to the first portion and a fourth portion corresponding to the second portion. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to change the font size of the third portion to a third font size smaller than the first font size and larger than the second font size, based on identifying a size of the third portion within the second text that is larger than a size of the first portion expressed through the first area.
예를 들어, 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 제1 텍스트, 및 상기 제1 텍스트의 일부분의 속성을 나타내는 제1 태그를 포함하는 제1 데이터(예, 도 4의 제1 데이터(430))를 이용하여, 상기 제2 텍스트를 획득하기 위한 번역 기능을 실행하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 번역 기능에 기반하여, 상기 제2 텍스트, 및 상기 제1 텍스트의 상기 일부분에 대응하는, 상기 제2 텍스트의 일부분의 속성을 나타내는, 제2 태그를 포함하는, 제2 데이터(예, 도 4의 제2 데이터(440))를 획득하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 제2 데이터에 의해 나타나는 상기 속성을 가지는 상기 제2 텍스트를, 상기 디스플레이 상에 표시하도록, 야기할 수 있다. For example, the instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to execute a translation function to obtain the second text using first data (e.g., first data (430) of FIG. 4) including the first text and a first tag indicative of an attribute of a portion of the first text. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to obtain, based on the translation function, second data (e.g., second data (440) of FIG. 4) including the second text and a second tag indicative of an attribute of a portion of the second text corresponding to the portion of the first text. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to display, on the display, the second text having the attribute indicated by the second data.
예를 들어, 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 제1 영역의 상기 사이즈 보다 큰 상기 영역의 사이즈에 기반하여, 상기 전자 문서 내에서 상기 제1 영역에 인접한 문서 오브젝트를 식별하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 문서 오브젝트 및 상기 제1 영역 사이의 거리가 증가되도록, 상기 전자 문서 내에서 상기 문서 오브젝트를 이동하도록, 야기할 수 있다.For example, the instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to identify a document object adjacent to the first area within the electronic document based on a size of the area being greater than the size of the first area. The instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to move the document object within the electronic document such that a distance between the document object and the first area increases.
예를 들어, 상기 인스트럭션들은, 상기 적어도 하나의 프로세서에 의해 개별적으로 또는 집합적으로 실행될 시, 상기 전자 장치가, 상기 제1 영역의 상기 사이즈 보다 작은 상기 영역의 상기 사이즈에 기반하여, 상기 제1 영역의 시작 위치로부터 시작되고, 상기 식별된 사이즈를 가지는 상기 영역에서, 상기 제2 텍스트를 포함하는, 상기 전자 문서를 표시하도록, 야기할 수 있다.For example, the instructions, when individually or collectively executed by the at least one processor, may cause the electronic device to display the electronic document, including the second text, in the area starting from a start position of the first area and having the identified size, based on the size of the area being smaller than the size of the first area.
상술한 바와 같은, 일 실시예에서, 인스트럭션들을 저장하는 비-일시적 컴퓨터 판독 가능 저장 매체가 제공될 수 있다. 상기 인스트럭션들은, 디스플레이를 포함하는 전자 장치에 의해 실행될 시, 상기 전자 장치가, 전자 문서 내의 제1 영역 내에 포함된, 제1 언어의 제1 텍스트의 번역을 위한 입력을 수신하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 입력에 기반하여, 상기 제1 텍스트로부터 번역된 제2 언어의 제2 텍스트를 획득하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 전자 문서 내에서, 상기 제2 텍스트를 표시하기 위한 영역의 사이즈를 식별하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 전자 문서 내의 상기 제1 영역의 사이즈 보다 큰 상기 영역의 상기 사이즈에 기반하여, 상기 전자 문서 내의 상기 제1 영역, 및 상기 전자 문서의 수직 방향을 따라 상기 제1 영역에 인접한, 상기 전자 문서 내의 제1 공백 영역을 포함하는, 상기 전자 문서 내의 제2 영역의 사이즈를 식별하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 제2 영역의 상기 사이즈 보다 작은 상기 영역의 상기 사이즈에 기반하여, 상기 제1 영역 및 상기 제1 공백 영역을 포함하는 상기 제2 영역에서 상기 제2 텍스트를 포함하는 상기 전자 문서를 표시하도록, 야기할 수 있다. 상기 제2 영역의 상기 사이즈 보다 작은 상기 영역의 상기 사이즈에 기반하여, 상기 제2 영역의 상기 사이즈 보다 큰 상기 영역의 상기 사이즈에 기반하여, 상기 제1 영역, 및 상기 전자 문서의 수평 방향을 따라 상기 제1 영역에 인접한, 상기 전자 문서 내의 제2 공백 영역을 포함하는, 상기 전자 문서 내의 제3 영역에서, 상기 제2 텍스트를 포함하는 상기 전자 문서를 표시하도록, 야기할 수 있다. In one embodiment, as described above, a non-transitory computer-readable storage medium storing instructions may be provided. The instructions, when executed by an electronic device including a display, may cause the electronic device to receive an input for translating a first text in a first language contained in a first area within an electronic document. The instructions, when executed by the electronic device, may cause the electronic device to obtain a second text in a second language translated from the first text based on the input. The instructions, when executed by the electronic device, may cause the electronic device to identify a size of an area within the electronic document for displaying the second text. The instructions, when executed by the electronic device, may cause the electronic device to identify, based on the size of the area that is greater than the size of the first area within the electronic document, a size of a second area within the electronic document, the second area including the first area and a first blank area within the electronic document, adjacent to the first area along a vertical direction of the electronic document. The instructions, when executed by the electronic device, may cause the electronic device to display, based on the size of the area that is less than the size of the second area, the electronic document including the second text in the second area, the second area including the first area and the first blank area. Based on the size of the area that is less than the size of the second area, based on the size of the area that is greater than the size of the second area, the electronic document including the second text in a third area within the electronic document, the third area including the first area and a second blank area within the electronic document, adjacent to the first area along a horizontal direction of the electronic document.
예를 들어, 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 제1 영역의 상기 사이즈 보다 큰 상기 영역의 사이즈에 기반하여, 상기 제2 언어의 상기 제2 텍스트가, 상기 제1 텍스트의 상기 속성과 다른 속성을 가지도록, 상기 제2 언어의 상기 제2 텍스트의 속성을 조절하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 조절된 속성을 가지는 상기 제2 언어의 상기 제2 텍스트를, 상기 제1 영역의 시작 위치로부터 표시하도록, 야기할 수 있다. For example, the instructions, when executed by the electronic device, may cause the electronic device to adjust an attribute of the second text in the second language such that the second text in the second language has an attribute different from the attribute of the first text, based on a size of the region that is greater than the size of the first region. The instructions, when executed by the electronic device, may cause the electronic device to display the second text in the second language having the adjusted attribute from a start position of the first region.
예를 들어, 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 폰트 사이즈, 및 라인 간격 중 적어도 하나를 감소하여, 상기 제2 텍스트의 상기 속성을 조절하도록, 야기할 수 있다. For example, the instructions, when executed by the electronic device, may cause the electronic device to adjust the property of the second text by decreasing at least one of a font size and a line spacing.
예를 들어, 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 제1 폰트 사이즈를 가지는 제1 부분, 및 상기 제1 폰트 사이즈 보다 작은 제2 폰트 사이즈를 가지는 제2 부분을 포함하는 상기 제1 텍스트의 번역을 위한 상기 입력을 수신하는 것에 기반하여, 상기 제1 부분에 대응하는 제3 부분, 및 상기 제2 부분에 대응하는 제4 부분을 포함하는 상기 제2 텍스트를 획득하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 제1 영역을 통해 표현된 상기 제1 부분의 사이즈 보다 큰, 상기 제2 텍스트 내의 상기 제3 부분의 사이즈를 식별하는 것에 기반하여, 상기 제3 부분의 폰트 사이즈를, 상기 제1 폰트 사이즈 보다 작고, 상기 제2 폰트 사이즈 보다 큰, 제3 폰트 사이즈로 변경하도록, 야기할 수 있다. For example, the instructions, when executed by the electronic device, may cause the electronic device to obtain, based on receiving the input for translation of the first text, the first text including a first portion having a first font size and a second portion having a second font size smaller than the first font size, the second text including a third portion corresponding to the first portion and a fourth portion corresponding to the second portion. The instructions, when executed by the electronic device, may cause the electronic device to change the font size of the third portion to a third font size smaller than the first font size and larger than the second font size, based on identifying a size of the third portion within the second text that is larger than a size of the first portion expressed through the first area.
예를 들어, 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 제1 텍스트, 및 상기 제1 텍스트의 일부분의 속성을 나타내는 제1 태그를 포함하는 제1 데이터를 이용하여, 상기 제2 텍스트를 획득하기 위한 번역 기능을 실행하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 번역 기능에 기반하여, 상기 제2 텍스트, 및 상기 제1 텍스트의 상기 일부분에 대응하는, 상기 제2 텍스트의 일부분의 속성을 나타내는, 제2 태그를 포함하는, 제2 데이터를 획득하도록, 야기할 수 있다. 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 제2 데이터에 의해 나타나는 상기 속성을 가지는 상기 제2 텍스트를, 상기 디스플레이 상에 표시하도록, 야기할 수 있다. For example, the instructions, when executed by the electronic device, may cause the electronic device to execute a translation function to obtain the second text using the first data, the first data including the first text and a first tag indicative of an attribute of a portion of the first text. The instructions, when executed by the electronic device, may cause the electronic device to obtain, based on the translation function, second data, the second data including the second text and a second tag indicative of an attribute of a portion of the second text corresponding to the portion of the first text. The instructions, when executed by the electronic device, may cause the electronic device to display, on the display, the second text having the attribute indicated by the second data.
예를 들어, 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 제1 영역의 상기 사이즈 보다 큰 상기 영역의 사이즈에 기반하여, 상기 전자 문서 내에서 상기 제1 영역에 인접한 문서 오브젝트를 식별하도록, 야기할 수 있다. 상기 문서 오브젝트 및 상기 제1 영역 사이의 거리가 증가되도록, 상기 전자 문서 내에서 상기 문서 오브젝트를 이동하도록, 야기할 수 있다. For example, the instructions, when executed by the electronic device, may cause the electronic device to identify a document object adjacent to the first area within the electronic document based on a size of the area being greater than the size of the first area. The instructions may cause the electronic device to move the document object within the electronic document such that the distance between the document object and the first area increases.
예를 들어, 상기 인스트럭션들은, 상기 전자 장치에 의해 실행될 시, 상기 전자 장치가, 상기 제1 영역의 상기 사이즈 보다 작은 상기 영역의 상기 사이즈에 기반하여, 상기 제1 영역의 시작 위치로부터 시작되고, 상기 식별된 사이즈를 가지는 상기 영역에서, 상기 제2 텍스트를 포함하는, 상기 전자 문서를 표시하도록, 야기할 수 있다. For example, the instructions, when executed by the electronic device, may cause the electronic device to display the electronic document, including the second text, in the area starting from a start position of the first area and having the identified size, based on the size of the area being smaller than the size of the first area.
상술한 바와 같은, 일 실시예에서, 디스플레이를 포함하는 전자 장치의 방법이 제공될 수 있다. 상기 방법은, 전자 문서 내의 제1 영역 내에 포함된, 제1 언어의 제1 텍스트의 번역을 위한 입력을 수신하는 동작을 포함할 수 있다. 상기 방법은, 상기 입력에 기반하여, 상기 제1 텍스트로부터 번역된 제2 언어의 제2 텍스트를 획득하는 동작을 포함할 수 있다. 상기 방법은, 상기 전자 문서 내에서, 상기 제2 텍스트를 표시하기 위한 영역의 사이즈를 식별하는 동작을 포함할 수 있다. 상기 방법은, 상기 전자 문서 내의 상기 제1 영역의 사이즈 보다 큰 상기 영역의 상기 사이즈에 기반하여, 상기 전자 문서 내의 상기 제1 영역, 및 상기 전자 문서의 수직 방향을 따라 상기 제1 영역에 인접한, 상기 전자 문서 내의 제1 공백 영역을 포함하는, 상기 전자 문서 내의 제2 영역의 사이즈를 식별하는 동작을 포함할 수 있다. 상기 방법은, 상기 제2 영역의 상기 사이즈 보다 작은 상기 영역의 상기 사이즈에 기반하여, 상기 제1 영역 및 상기 공백 영역을 포함하는 상기 제2 영역에서 상기 제2 텍스트를 포함하는 상기 전자 문서를 표시하는 동작을 포함할 수 있다. 상기 방법은, 상기 제2 영역의 상기 사이즈 보다 큰 상기 영역의 상기 사이즈에 기반하여, 상기 제1 영역, 및 상기 전자 문서의 수평 방향을 따라 상기 제1 영역에 인접한, 상기 전자 문서 내의 제2 공백 영역을 포함하는, 상기 전자 문서 내의 제3 영역에서, 상기 제2 텍스트를 포함하는 상기 전자 문서를 표시하는 동작을 포함할 수 있다. As described above, in one embodiment, a method of an electronic device including a display may be provided. The method may include receiving an input for translating a first text in a first language, the first text included in a first area within an electronic document. The method may include obtaining a second text in a second language, translated from the first text, based on the input. The method may include identifying a size of an area for displaying the second text within the electronic document. The method may include identifying a size of a second area within the electronic document, the second area including the first area within the electronic document and a first blank area within the electronic document adjacent to the first area along a vertical direction of the electronic document, based on a size of the area being larger than the size of the first area within the electronic document. The method may include displaying the electronic document including the second text in the second area including the first area and the blank area, based on a size of the area being smaller than the size of the second area. The method may include an operation of displaying the electronic document including the second text in a third area within the electronic document, the third area including the first area and a second blank area within the electronic document adjacent to the first area along a horizontal direction of the electronic document, based on the size of the area being greater than the size of the second area.
예를 들어, 상기 방법은, 상기 제1 영역의 상기 사이즈 보다 큰 상기 영역의 사이즈에 기반하여, 상기 제2 언어의 상기 제2 텍스트가, 상기 제1 텍스트의 상기 속성과 다른 속성을 가지도록, 상기 제2 언어의 상기 제2 텍스트의 속성을 조절하는 동작을 포함할 수 있다. 상기 방법은, 상기 조절된 속성을 가지는 상기 제2 언어의 상기 제2 텍스트를, 상기 제1 영역의 시작 위치로부터 표시하는 동작을 포함할 수 있다.For example, the method may include an operation of adjusting an attribute of the second text of the second language so that the second text of the second language has an attribute different from the attribute of the first text, based on a size of the region that is larger than the size of the first region. The method may include an operation of displaying the second text of the second language having the adjusted attribute from a start position of the first region.
예를 들어, 상기 속성을 조절하는 동작은, 폰트 사이즈, 및 라인 간격 중 적어도 하나를 감소하여, 상기 제2 텍스트의 상기 속성을 조절하는 동작을 포함할 수 있다.For example, the act of adjusting the property may include an act of adjusting the property of the second text by reducing at least one of a font size and a line spacing.
예를 들어, 상기 속성을 조절하는 동작은, 제1 폰트 사이즈를 가지는 제1 부분, 및 상기 제1 폰트 사이즈 보다 작은 제2 폰트 사이즈를 가지는 제2 부분을 포함하는 상기 제1 텍스트의 번역을 위한 입력을 수신하는 것에 기반하여, 상기 제1 부분에 대응하는 제3 부분, 및 상기 제2 부분에 대응하는 제4 부분을 포함하는 상기 제2 텍스트를 획득하는 동작을 포함할 수 있다. 상기 속성을 조절하는 동작은 상기 제1 영역을 통해 표현된 상기 제1 부분의 사이즈 보다 큰, 상기 제2 텍스트 내의 상기 제3 부분의 사이즈를 식별하는 것에 기반하여, 상기 제1 부분의 폰트 사이즈를, 상기 제1 폰트 사이즈 보다 작고, 상기 제2 폰트 사이즈 보다 큰, 제3 폰트 사이즈로 변경하는 동작을 포함할 수 있다.For example, the act of adjusting the property may include an act of obtaining a second text including a third portion corresponding to the first portion and a fourth portion corresponding to the second portion, based on receiving an input for translation of the first text including a first portion having a first font size and a second portion having a second font size smaller than the first font size. The act of adjusting the property may include an act of changing a font size of the first portion to a third font size smaller than the first font size and larger than the second font size, based on identifying a size of the third portion within the second text that is larger than a size of the first portion expressed through the first area.
예를 들어, 상기 획득하는 동작은, 상기 제1 텍스트, 및 상기 제1 텍스트의 일부분의 속성을 나타내는 제1 태그를 포함하는 제1 데이터를 이용하여, 상기 제2 텍스트를 획득하기 위한 번역 기능을 실행하는 동작을 포함할 수 있다. 상기 획득하는 동작은, 상기 번역 기능에 기반하여, 상기 제2 텍스트, 및 상기 제1 텍스트의 상기 일부분에 대응하는, 상기 제2 텍스트의 일부분의 속성을 나타내는, 제2 태그를 포함하는, 제2 데이터를 획득하는 동작을 포함할 수 있다. 상기 제2 텍스트를 포함하는 상기 전자 문서를 표시하는 동작은, 상기 제2 데이터에 의해 나타나는 상기 속성을 가지는 상기 제2 텍스트를, 상기 디스플레이 상에 표시하는 동작을 포함할 수 있다. For example, the obtaining operation may include an operation of executing a translation function for obtaining the second text using first data including the first text and a first tag indicating an attribute of a portion of the first text. The obtaining operation may include an operation of obtaining, based on the translation function, second data including the second text and a second tag indicating an attribute of a portion of the second text corresponding to the portion of the first text. The displaying operation of the electronic document including the second text may include an operation of displaying, on the display, the second text having the attribute indicated by the second data.
예를 들어, 상기 방법은, 상기 제1 영역의 상기 사이즈 보다 큰 상기 영역의 사이즈에 기반하여, 상기 전자 문서 내에서 상기 제1 영역에 인접한 문서 오브젝트를 식별하는 동작을 포함할 수 있다. 상기 방법은, 상기 문서 오브젝트 및 상기 제1 영역 사이의 거리가 증가되도록, 상기 전자 문서 내에서 상기 문서 오브젝트를 이동하는 동작을 포함할 수 있다. For example, the method may include an operation of identifying a document object adjacent to the first area within the electronic document based on a size of the area that is greater than the size of the first area. The method may include an operation of moving the document object within the electronic document such that the distance between the document object and the first area increases.
예를 들어, 상기 이동하는 동작은, 상기 제1 영역 및 상기 문서 오브젝트를 포함하는, 상기 전자 문서 내의 가상 페이지 내에서의 상기 문서 오브젝트의 위치를 식별하는 동작을 포함할 수 있다. 상기 이동하는 동작은, 상기 문서 오브젝트의 적어도 일부분이 상기 가상 페이지의 밖으로 이동됨을 식별하는 것에 기반하여, 상기 가상 페이지의; 사이즈를 증가시키는 동작을 포함할 수 있다. 상기 이동하는 동작은, 상기 문서 오브젝트의 적어도 일부분이 상기 가상 페이지의 밖으로 이동됨을 식별하는 것에 기반하여, 상기 전자 문서 내에서, 상기 가상 페이지 이후의 다른 가상 페이지를 추가하는 동작을 포함할 수 있다. 상기 이동하는 동작은, 상기 다른 가상 페이지로 상기 문서 오브젝트를 이동하는 동작을 포함할 수 있다. For example, the moving operation may include an operation of identifying a location of the document object within a virtual page within the electronic document, the virtual page including the first region and the document object. The moving operation may include an operation of increasing a size of the virtual page based on identifying that at least a portion of the document object has been moved out of the virtual page. The moving operation may include an operation of adding another virtual page after the virtual page within the electronic document based on identifying that at least a portion of the document object has been moved out of the virtual page. The moving operation may include an operation of moving the document object to the other virtual page.
여기서 사용된 바와 같이, "경우(if)" 용어는, 맥락에 따라, "~할 시에(when, upon)", "결정하는 것에 응답하여", 또는 "탐지하는 것에 응답하여"를 의미하는 것으로 이해될 것이다. 유사하게, "~하는 것으로 결정된 경우", 또는 "[언급된 조건 또는 이벤트]가 탐지된 경우"는, 선택적으로, "결정할 시에", 또는 "결정하는 것에 응답하여", "[언급된 조건 또는 이벤트]를 탐지할 시에", 또는 "[언급된 조건 또는 이벤트]를 탐지하는 것에 응답하여"를 의미하는 것으로 이해될 것이다. As used herein, the term "if" will be understood to mean "when, upon," "in response to determining," or "in response to detecting," depending on the context. Similarly, "if it is determined to," or "if [the stated condition or event] is detected," will optionally be understood to mean "upon determining," or "in response to determining," "upon detecting [the stated condition or event]," or "in response to detecting [the stated condition or event]."
이상에서 설명된 장치는 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 어플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다. The devices described above may be implemented as hardware components, software components, and/or a combination of hardware components and software components. For example, the devices and components described in the embodiments may be implemented using one or more general-purpose computers or special-purpose computers, such as a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a programmable logic unit (PLU), a microprocessor, or any other device capable of executing instructions and responding to them. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to the execution of the software. For ease of understanding, the processing device is sometimes described as being used alone; however, one of ordinary skill in the art will recognize that the processing device may include multiple processing elements and/or multiple types of processing elements. For example, a processing unit may include multiple processors, or a processor and a controller. Other processing configurations, such as parallel processors, are also possible.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다. Software may include a computer program, code, instructions, or a combination of one or more of these, which may configure a processing device to perform a desired operation or may independently or collectively command the processing device. The software and/or data may be embodied in any type of machine, component, physical device, computer storage medium, or device for interpretation by the processing device or for providing instructions or data to the processing device. The software may also be distributed over networked computer systems and stored or executed in a distributed manner. The software and data may be stored on one or more computer-readable recording media.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 이때, 매체는 컴퓨터로 실행 가능한 프로그램을 계속 저장하거나, 실행 또는 다운로드를 위해 임시 저장하는 것일 수도 있다. 또한, 매체는 단일 또는 수 개의 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있는데, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 매체의 예시로는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등을 포함하여 프로그램 명령어가 저장되도록 구성된 것이 있을 수 있다. 또한, 다른 매체의 예시로, 어플리케이션을 유통하는 앱 스토어나 기타 다양한 소프트웨어를 공급 내지 유통하는 사이트, 서버 등에서 관리하는 기록매체 내지 저장매체도 들 수 있다. The method according to the embodiment may be implemented in the form of program commands that can be executed through various computer means and recorded on a computer-readable medium. In this case, the medium may be one that continuously stores a computer-executable program or one that temporarily stores it for execution or download. In addition, the medium may be various recording means or storage means in the form of a single or multiple hardware combinations, and is not limited to a medium directly connected to a computer system, but may also be distributed over a network. Examples of the medium may include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and those configured to store program commands, including ROM, RAM, and flash memory. In addition, examples of other media may include recording media or storage media managed by app stores that distribute applications, sites that supply or distribute various software, servers, etc.
이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다. Although the embodiments described above have been described by way of limited examples and drawings, those skilled in the art will appreciate that various modifications and variations can be made based on the above teachings. For example, appropriate results can still be achieved even if the described techniques are performed in a different order than described, and/or components of the described systems, structures, devices, circuits, etc. are combined or combined in a different manner than described, or are replaced or substituted with other components or equivalents.
그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다. Therefore, other implementations, other embodiments, and equivalents to the claims also fall within the scope of the claims described below.
Claims (15)
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR20240088018 | 2024-07-04 | ||
| KR10-2024-0088018 | 2024-07-04 | ||
| KR1020240120367A KR20260006409A (en) | 2024-07-04 | 2024-09-04 | Electronic device, method, and non-transitory computer readable storage medium to adjust arrangement of content of electronic document |
| KR10-2024-0120367 | 2024-09-04 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2026010140A1 true WO2026010140A1 (en) | 2026-01-08 |
Family
ID=98318758
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2025/006745 Pending WO2026010140A1 (en) | 2024-07-04 | 2025-05-19 | Electronic device, method, and non-transitory computer-readable storage medium for adjusting arrangement of contents of electronic document |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2026010140A1 (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2918114B2 (en) * | 1988-06-22 | 1999-07-12 | 株式会社リコー | Translation display device |
| KR20140073480A (en) * | 2011-06-30 | 2014-06-16 | 구글 잉크. | Rendering a text image following a line |
| JP2015204075A (en) * | 2014-04-16 | 2015-11-16 | コニカミノルタ株式会社 | Electronic document creation system, and program |
| JP2020003892A (en) * | 2018-06-26 | 2020-01-09 | コニカミノルタ株式会社 | Writing conversion device, conversion display device, conversion display system, control method, and recording medium |
| KR102586180B1 (en) * | 2023-04-14 | 2023-10-10 | 주식회사 어베어 | A method and an apparatus for creating translated images while maintaining the style of text |
-
2025
- 2025-05-19 WO PCT/KR2025/006745 patent/WO2026010140A1/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2918114B2 (en) * | 1988-06-22 | 1999-07-12 | 株式会社リコー | Translation display device |
| KR20140073480A (en) * | 2011-06-30 | 2014-06-16 | 구글 잉크. | Rendering a text image following a line |
| JP2015204075A (en) * | 2014-04-16 | 2015-11-16 | コニカミノルタ株式会社 | Electronic document creation system, and program |
| JP2020003892A (en) * | 2018-06-26 | 2020-01-09 | コニカミノルタ株式会社 | Writing conversion device, conversion display device, conversion display system, control method, and recording medium |
| KR102586180B1 (en) * | 2023-04-14 | 2023-10-10 | 주식회사 어베어 | A method and an apparatus for creating translated images while maintaining the style of text |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2022098125A1 (en) | Electronic device and screen control method thereof | |
| WO2020027562A1 (en) | Electronic apparatus for controlling display of virtual input interface in environment of a plurality of output screens and operating method thereof | |
| WO2022030776A1 (en) | Method and device for providing handwriting input in electronic device | |
| WO2026010140A1 (en) | Electronic device, method, and non-transitory computer-readable storage medium for adjusting arrangement of contents of electronic document | |
| WO2022119276A1 (en) | Flexible display electronic device and operation method thereof | |
| WO2025154986A1 (en) | Electronic device and multi-window layout generation method | |
| WO2023182685A1 (en) | Electronic device comprising expandable display, and user interface provision method | |
| WO2026014699A1 (en) | Electronic device, method, and non-transitory computer-readable storage medium for grouping text of electronic document | |
| WO2022080939A1 (en) | Electronic device and method for operating keypad of electronic device | |
| WO2026010141A1 (en) | Electronic device, method, and non-transitory computer-readable storage medium for generating or displaying electronic document including watermark | |
| WO2025058310A1 (en) | Method for providing summary content and electronic device therefor | |
| WO2022103035A1 (en) | Wearable device having flexible display and method for operating same according to changes in state thereof | |
| WO2025264081A1 (en) | Electronic device for displaying content, operating method thereof, and recording medium | |
| WO2026015002A1 (en) | Electronic device for providing executable function to selection area of screen, operating method thereof, and recording medium | |
| WO2026005354A1 (en) | Electronic device and handwriting correction method based on input field of background in electronic device | |
| WO2025084891A1 (en) | Electronic device and method for removing content in web page | |
| KR20260006409A (en) | Electronic device, method, and non-transitory computer readable storage medium to adjust arrangement of content of electronic document | |
| WO2026010336A1 (en) | Electronic device for providing thumbnail image and operation method therefor | |
| WO2026023856A1 (en) | Electronic device, method, and non-transitory computer-readable recording medium for blocking advertisement | |
| WO2025079857A1 (en) | Electronic device, method, and non-transitory computer-readable recording medium for displaying widget | |
| WO2026010262A1 (en) | Method for displaying items and electronic device supporting same | |
| WO2025150684A1 (en) | Electronic device for summarizing text content according to format and operation method therefor | |
| WO2024014655A1 (en) | Electronic device and method for identifying sentence expressed by strokes | |
| WO2022114495A1 (en) | Method and apparatus for controlling user interface of flexible display | |
| WO2025018578A1 (en) | Electronic device and method for changing displaying of widget |