require('Module:No globals')  
local wpsu={}  
--[[-------------------------< S H I P P R E F I X L I S T >-----------------------------------------------  
This is a list of currently supported ship prefixes.  
To add to this list the form is:
['prefix'] = true,
the trailing comma is important.  
local ship_prefix_list =
{
['ARA'] = true, -- Armada de la República Argentina
['ARC'] = true, -- Armada Nacional de la República de Colombia
['ARM'] = true, -- Armada de la República Mexicana
['ARV'] = true, -- Armada Republica de Venezuela
['BAE'] = true, -- Buque de la Armada de Ecuador
['BAP'] = true, -- Peruvian Navy Ship
['BNS'] = true, -- Bangladesh Navy Ship
['BRP'] = true, -- Barko ng Republika ng Pilipinas
['CCGS'] = true, -- Canadian Coast Guard Ship
['CFAV'] = true, -- Canadian Forces Auxiliary Vessel
['CS'] = true, -- Cable Ship
['CSS'] = true, -- Confederate States Ship
['FGS'] = true, -- Federal German Ship
['GTS'] = true, -- Gas Turbine Ship
['HDMS'] = true, -- His/Her Danish Majesty's Ship
['HM'] = true, -- His/Her Majesty's, then used with the type of ship in military use (UK)
['HMAS'] = true, -- Her/His Majesty's Australian Ship
['HMBS'] = true, -- Her/His Majesty's Britannic Ship (also: Bahamian, Bermudian, Burmese)
['HMC'] = true, -- Her/His Majesty's Cutter
['HMCS'] = true, -- Her/His Majesty's Canadian Ship (also Colonial)
['HMHS'] = true, -- His/Her Majesty's Hospital Ship
['HMIS'] = true, -- Her/His Majesty's Indian Ship (pre republic)
['HMNZS'] = true, -- Her/His Majesty's New Zealand Ship
['HMPNGS'] = true, -- His/Her Majesty's Papua New Guinea Ship
['HMQS'] = true, -- Her/His Majesty's Queensland Ship
['HMRC'] = true, -- His/Her Majesty's Revenue Cutter
['HMS'] = true, -- Her/His Majesty's Ship
['HMSAS'] = true, -- Her/His Majesty's South African Ship
['HMT'] = true, -- Her/His Majesty's Trawler
['HMVS'] = true, -- Her/His Majesty's Victorian Ship
['HMY'] = true, -- His/Her Majesty's Yacht
['HNLMS'] = true, -- His/Her Netherlands Majesty’s Ship
['HNoMS'] = true, -- His/Her Norwegian Majesty's Ship
['HSwMS'] = true, -- His/Her Swedish Majesty's Ship
['HTMS'] = true, -- His Thai Majesty's Ship
['INS'] = true, -- Indian Naval Ship, Israeli Naval Ship
['JDS'] = true, -- Japanese Defence Ship
['JS'] = true, -- Japanese Ship (post 2008)
['KD'] = true, -- Kapal Di-Raja — His Majesty's Ship (Malaysia)
['KDM'] = true, -- Kongelige Danske Marine
['KRI'] = true, -- Kapal Republik Indonesia
['LÉ'] = true, -- Long Éireannach – Irish ship
['MF'] = true, -- Motor Ferry
['LKL'] = true, -- Lietuvos Karinis Laivas – Lithuania
['MS'] = true, -- Motor Ship
['MT'] = true, -- Motor Tanker
['MV'] = true, -- Motor Vessel
['NLV'] = true, -- Northern Lighthouse Vessel
['NMS'] = true, -- Nava Majestăţii Sale (His/Her Majesty's Ship) - used before 1945 by the Royal Romanian Navy
['NoCGV'] = true, -- Norwegian Coast Guard Vessel
['NOAAS'] = true, -- National Oceanic and Atmospheric Administration Ship
['NRP'] = true, -- Navio da República Portuguesa
['ORP'] = true, -- Okręt Rzeczypospolitej Polskiej
['PNS'] = true, -- Pakistani Naval Ship
['PS'] = true, -- Paddle Steamer
['RFA'] = true, -- Royal Fleet Auxiliary
['RMAS'] = true, -- Royal Maritime Auxiliary Service
['RMS'] = true, -- Royal Mail Ship
['RNLB'] = true, -- Royal National Lifeboat
['ROCS'] = true, -- Republic of China Ship
['ROKS'] = true, -- Republic of Korea Ship
['RPS'] = true, -- Republic of the Philippines Ship
['RRS'] = true, -- Royal Research Ship
['RSS'] = true, -- Republic of Singapore Ship
['RV'] = true, -- Research Vessel
['SAS'] = true, -- South African Ship
['SLNS'] = true, -- Sri Lanka Naval Ship
['SM'] = true, -- Seiner Majestät Unterseeboot
['SMS'] = true, -- Seiner Majestät Schiff
['SS'] = true, -- Screw Steamer or Steamship
['TCG'] = true, -- Türkiye Cumhuriyeti Gemisi
['TS'] = true, -- Training ship
['TV'] = true, -- Training vessel
['UAM'] = true, -- Unidade Auxiliar da Marinha - Navy Auxiliary Unit (Portuguese Navy non-military ships)
['USAFS'] = true, -- United States Air Force ship
['USAHS'] = true, -- United States Army Hospital Ship
['USAS'] = true, -- United States Army Ship
['USAT'] = true, -- United States Army Transport
['USAV'] = true, -- United States Army Vessel
['USC&GS'] = true, -- United States Coast and Geodetic Survey
['USC&amp;GS'] = true, -- United States Coast and Geodetic Survey (crude work-around)
['USC&#38;GS'] = true, -- United States Coast and Geodetic Survey (crude work-around)
['USC&GSS'] = true, -- United States Coast and Geodetic Survey Ship
['USC&amp;GSS'] = true, -- United States Coast and Geodetic Survey Ship (crude work-around)
['USC&#38;GSS'] = true, -- United States Coast and Geodetic Survey Ship (crude work-around)
['USCGC'] = true, -- United States Coast Guard Cutter
['USLHT'] = true, -- United State Light House Tender
['USNS'] = true, -- United States Naval Ship
['USRC'] = true, -- United States Revenue Cutter
['USS'] = true, -- United States Ship
}  
--[[--------------------------< N A T I O N A L I T Y >--------------------------------------------------------  
Article titles for ships in navies that do not use a standardized prefix follow the title format:
<nationality> <ship type> <name> <(disambiguator)>  
This is a list of nationalities.  
To add to this list the form is:
['Nationality'] = true,
the trailing comma is important. Use the adjective form for nationality, always capitalize. Please insert nationalities in alphabetical order.  
local nationality_list =
{
['Albanian'] = true,
['American'] = true,
['Australian'] = true,
['Belgian'] = true,
['Brazilian'] = true,
['Bulgarian'] = true,
['Chilean'] = true,
['Chinese'] = true,
['Croatian'] = true,
['Danish'] = true,
['Dominican'] = true,
['Dutch'] = true,
['East Timorese'] = true,
['Egyptian'] = true,
['English'] = true,
['Finnish'] = true,
['French'] = true,
['German'] = true,
['Greek'] = true,
['Grenadan'] = true,
['Iranian'] = true,
['Irish'] = true,
['Italian'] = true,
['Japanese'] = true,
['Latvian'] = true,
['Libyan'] = true,
['Lithuanian'] = true,
['Maltese'] = true,
['Mexican'] = true,
['Nigerian'] = true,
['Ottoman'] = true,
['Peruvian'] = true,
['Portuguese'] = true,
['Romanian'] = true,
['Russian'] = true,
['Scottish'] = true,
['Slovenian'] = true,
['Soviet'] = true,
['Spanish'] = true,
['Swedish'] = true,
['Texan'] = true,
['Ukrainian'] = true,
['United States'] = true,
['Vietnamese'] = true,
['Yugoslav'] = true,
}  
--[[--------------------------< S H I P T Y P E >------------------------------------------------------------  
Article titles for ships in navies that do not use a standardized prefix follow the title format:
<nationality> <ship type> <name> <(disambiguator)>  
Article titles for ships may or may not be naval ships may follow the title format:
<name> <(disambiguator)>
where <(disambiguator)> may be some form of ship type, hull designator or pennant number, or year. This tool will
format ship names that contain a recognized ship type in <(disambiguator)>.  
This list is used to <find ship> when the article title begins with a nationality. This is important because the tool
needs to know where the <ship type> ends and <name> begins so that it can properly place the italic markup. The search
will find an exact match (including case) for ship types that are 1 to 4 words long.  
This list is also used to find ship type in <(disambiguator)>. The search is whole word; use the simplest form.
For example, because 'icebreaker' is defined, that ship type is sufficient to cause the tool to properly format:
Astrolabe (icebreaker)
Krassin (1917 icebreaker)
Taymyr (nuclear icebreaker)  
Searches for ship type in <(disambiguator)> are whole word. When looking for 'ship', the tool will find
Auguste (ship)
Queen of Nations (clipper ship)
but will not find:
Sibir (steamship icebreaker) – the search for 'icebreaker' will  
This is a list of ship types. When adding new ship types, do not be too specific: 'aircraft carrier' but not 'light aircraft carrier'