AC polarity detection
As other posters have suggested, this can't be done via conductive measurement alone.  However, non-contact AC testers will properly differentiate line from neutral without a reference ground via capacitive sensing.  This type of hand-held tester often has a flat plastic blade at the tip.  Inserting the blade in the line slot will cause the LED to glow; inserting in neutral or ground will not glow:



There are a number of kits for this type of circuit, as we as many sample schematics available in a few minutes of searching (Search string: non-contact ac voltage detector circuit).  They're essentially just high gain amplifiers that drive an LED.

Using this type of sensor permanently mounted near the Neutral line can serve as an indicator that your plug has been inserted the wrong way, provided that you have a reliable way (i.e. not battery) of powering the circuit.