Where should be the criteria for building melee ships?
10-tile lake - no?
11-tile inland sea - yes?
1-tile lake with a canal out to the ocean?
1-tile lake with a potential canal that hasn't been built?
4-tile lake with a reachable enemy city?
While it is a bit silly that they keep building large navies to fill some little lake-sea I guess it might be hard to do anything about it if you allow it so to speak.
Does the AI even build canals, or that is to say canals that are longer then one tile that is. I am not even sure those, or the once that are just one tile long, are not just built by accident cause they don't seem to always put one down even when they can. Or even if having a few canal fortresses wouldn't be a significant shortcut for them. AI canal constructions seem very iffy and hit and miss.
It's not that melee ships are useless. After all they can bolster the city defense and/or they can retake the city if it's lost. But they are a bit of a sitting duck in the lake. Ranged ships would be better, even tho they are also very much sitting ducks.
It's not like they are going to build a large navy if it's just a 1 tile lake, at most 2 ships (one in the lake and one in the city), possibly a few more if they by accident or so manage to put some citadels or forts around the lake tile.
If it's a 10-tile lake or so having a few ships in it might make sense, filling every single square with a melee ship not so much. But I am not sure if the AI can be programmed in such a manner. I guess it's a side effect of making lakes equivalent to coast and sea city with all the buildings and such. The units are sort of a side effect of that.
If the lake is large enough to have several cities (including rivals) attached to it then a navy is completely a viable option imo.