Text this: Adaptive Fault Detection Based on Neural Networks and Multiple Sampling Points for Distribution Networks and Microgrids