Patent attributes
Disclosed is a method for controlling an electronic apparatus. A method for controlling an electronic apparatus includes: obtaining a speech signal; obtaining a first sentence based on the speech signal and obtaining a first feature value for the first sentence by inputting the first sentence to a natural language understanding module; obtaining first semantic information corresponding to the first sentence and obtaining a second feature value for the first semantic information by inputting the first semantic information to a natural language generation module; and training the natural language understanding module and the natural language generation module to provide the first feature value and the second feature value within a predetermined distance in a vector space.