Text this: Artificial Neural Network-Based Mechanism to Detect Security Threats in Wireless Sensor Networks