A portable communication device comprising: a memory; a microphone; a touchscreen display; a wireless communication circuit and at least one processor configured to: receive, via the touchscreen display, a touch input for executing a function of an application; determine a path rule through log collection according to the touch input together with context information and analysis of the log, wherein the path rule indicates sequentially changed states of the electronic device; after the function of the application is executed, display, via the touchscreen display, an indication of the function of the application for registering a shortcut for executing the function of the application using a voice command, wherein the shortcut corresponds to the path rule; receive, via the touchscreen display, a first input with respect to the indication; based at least in part on the first input, display, via the touchscreen display, a text associated with the function; and receive a user input while the text is displayed, transmit first data associated with the user input to an external server via the wireless communication circuit; receive a first response from the external server via the wireless communication circuit, the first response including information associated with the user input; wherein at least part of the user input is registered as a voice command to be used as a shortcut to execute the function of the application. a memory; a microphone; a touchscreen display; a wireless communication circuit and at least one processor configured to: receive, via the touchscreen display, a touch input for executing a function of an application; determine a path rule through log collection according to the touch input together with context information and analysis of the log, wherein the path rule indicates sequentially changed states of the electronic device; after the function of the application is executed, display, via the touchscreen display, an indication of the function of the application for registering a shortcut for executing the function of the application using a voice command, wherein the shortcut corresponds to the path rule; receive, via the touchscreen display, a first input with respect to the indication; based at least in part on the first input, display, via the touchscreen display, a text associated with the function; and receive a user input while the text is displayed, after the function of the application is executed, display, via the touchscreen display, an indication of the function of the application for registering a shortcut for executing the function of the application using a voice command, wherein the shortcut corresponds to the path rule; receive, via the touchscreen display, a first input with respect to the indication; based at least in part on the first input, display, via the touchscreen display, a text associated with the function; and receive a user input while the text is displayed, transmit first data associated with the user input to an external server via the wireless communication circuit; receive a first response from the external server via the wireless communication circuit, the first response including information associated with the user input; wherein at least part of the user input is registered as a voice command to be used as a shortcut to execute the function of the application. receive a first response from the external server via the wireless communication circuit, the first response including information associated with the user input; wherein at least part of the user input is registered as a voice command to be used as a shortcut to execute the function of the application.