Sweeping Edge is a special enchantment for your sword in Minecraft, and if you want to get it, you will need to either enchant books, trade with villagers, and loot dungeons.
That said, starting with enchanting books, you will need to first get an enchanting table, books, and lapis lazuli if you want to use this option.
You will then need to make and get all of that along with 15 bookcases and place them around the enchanting table with a one-block buffer zone between the 15 bookcases and the table.
This will in turn, increase the chances of getting higher-level enchantments, and you will also need to keep enchanting books until the enchantment you want shows up.
However, beyond this option, you can also fish using an enchanted fishing pole. To use the enchanted fishing pole option, you will first need to enchant a fishing pole with both luck of the sea, and lure. Doing so will then increase the chances of you getting enchanted books while fishing.
Next, after fishing is the option of trading either emeralds for books or looting dungeons; overall, both are decent options but shouldn't be relied upon as they are the least likely to work in the game.
Check out some of our other awesome Minecraft guides!