In many games rogue is close to archer. While archer main bow and use dagger in close combat to not be completly owned in melee, the rogues are fighting in close combat most of the time and just use bows/crosbows to take aggro from monsters or to attack while they got bind (rooted) by magic, to not be completly owned by ranged.
In several games rogue advancement is assasin(thief) or an archer(hunter) - you specialize with one of the weapons the rogues may use. In other games, such as Nostale, an archer can choose its spells before combat and become an Assasin who use daggers only (+chain hook/bombs), an Ranger with more range and better bow-related skills, or some sort of mecha-archer who uses pistols, guns, etc.
Basically archers and rogues are usually weak on STR and lack of durability. Instead they get plenty of DEX and dodge + lots of crits to made up for it. While archers use DEX for p.att with bows and benefit from distance combat to avoid being hurt, the assasins use DEX more for dodging attacks and getting better crits, as they engage in close combat and need to kill enemy fast or dodge as many hits possible.
You can think of it as a character who lack of brute force and physical strenght. A character that uses cunning, tricks, dexternity - all possible methods to counter his fragilness: from attacking at distance, to use blinding gas, slow down skills, poisons that weaken enemy, traps, bombs, invisibility, and most notably, they aim for weak points of enemies to land critical hits.
Swordsman on the other hand is the brute force warrior with plenty of stamine - they dont need trickery to win combat - they are very sturdy and can carry heavy swords to hurt enemies hard even without critical hits.
For me its rather weird that shinobi is not in archer tree as their hidden class. Afterall shinobi uses tricks, cunning, etc to fight enemies. It doesn’t fit for a swordsman to suddenly start throwing daggers/kunai or shurikens. Just imagine Hulk throwing shurikens - seriously why would he do that?
