How can one determine the appropriate meaning of 伺う in formal speech?


Is it based on the particle connecting the object of the verb?

For example,

> **に/へ** 伺う
>
> to go

vs

> **を** 伺う
>
> to ask

Is it **purely** based on the **context** of the sentence for distinguishing
between `to go`, `to come`, and `to visit`
([source](https://en.wikipedia.org/wiki/Honorific_speech_in_Japanese#Respectful_verbs))?




According to the dictionary, the word 伺う has 5 possible meanings, many of them
using を.  
So you have to look at the context to find the right meaning.  
Looking only at the particle may not be enough. Some sentences may not even
have a particle.  
[https://dictionary.goo.ne.jp/word/en/伺う/#je-5174](https://dictionary.goo.ne.jp/word/en/%E4%BC%BA%E3%81%86/#je-5174)  
[https://dictionary.goo.ne.jp/jn/18016/meaning/m0u/伺う/](https://dictionary.goo.ne.jp/jn/18016/meaning/m0u/%E4%BC%BA%E3%81%86/)  
<https://kotobank.jp/word/%E4%BC%BA%E3%81%86-439046>

But if you have:  
someplaceへ伺う  
it will most certainly be "to visit".




According to the dictionary, the word 伺う has 5 possible meanings, many of them
using を.  
So you have to look at the context to find the right meaning.  
Looking only at the particle may not be enough. Some sentences may not even
have a particle.  
[https://dictionary.goo.ne.jp/word/en/伺う/#je-5174](https://dictionary.goo.ne.jp/word/en/%E4%BC%BA%E3%81%86/#je-5174)  
[https://dictionary.goo.ne.jp/jn/18016/meaning/m0u/伺う/](https://dictionary.goo.ne.jp/jn/18016/meaning/m0u/%E4%BC%BA%E3%81%86/)  
<https://kotobank.jp/word/%E4%BC%BA%E3%81%86-439046>

But if you have:  
someplaceへ伺う  
it will most certainly be "to visit".

