You will need to take it apart and see exactly what has happened to it.
If it truly has swollen or is otherwise leaking - you will want to get it out of the system!
Most laptop work fine without a battery installed - but I have run into a few over the years which relied on the battery as part of it's regulation and could damage themselves if it wasn't installed (although if yours is badly damaged/swollen it might effectively be "not installed") - some searching on the exact model of computer might turn up information about how well it can be expected to do without a battery.
"swollen" isn't a NMIH battery failure you can expect to fix!
The most common failure of NMIC and NICD batteries is internal shorts which develop during "reverse" charging - not as uncommon as you might think, these batteries are almost always a number of cells(nominally 1.2v each) connected in series to get a higher total voltage (eg: if your pack puts out 12v, it has 10 cells in series) - and since the cells are never *exactly* matched(which is impossible) one or more will almost always "run out" slightly before the others and gets "changed" a bit in reverse as the others continue to operate. (this is why you should NEVER completely discharge your pack - unfortunately these types of cells lose capacity if they are regularly NOT fully discharged, so it becomes a bit of a "game of luck" to keep them fully working)
- This type of failure can be "recovered" to some extent - the internal shorts can sometimes be blasted away with a BRIEF high current - the most common way to do this is to use a large capacitor (say 5,000uf) changed to a few volts and discharge it through the SINGLE shorted cell (in the correct polarity for changing) a few times ... but this type of failure does not cause swelling - so I'm pretty sure this is not your issue!
The good news is that NMIH cells are very common and easy to get - most likely the ones in your pack are what's known as "Sub-C" in size - a bit smaller than a "C" dry cell.
A lot of battery places can rebuild your pack for you, or sell you the cells if you want to rebuild it yourself.
https://dunfield.themindfactory.com ; "Daves Old Computers" ; SW dev addict best known:
ImageDisk: rd/wr ANY floppy PChw can ; Micro-C: compiler for DOS+ManySmallCPU ; DDLINK: simple/small filetransfer(w/o netSW)via Lan/Lpt/Com